Login to participate
  
Register   Lost ID/password?

Louis Kessler’s Behold Blog

Programmers Solve Problems Like Genealogists Do - Sun, 8 Dec 2024

I’m working hard on Behold to get Version 0.99.1 Beta released. It will include GEDCOM export which I think will make it a valuable tool for many genealogists.

It has been taking longer to finish the GEDCOM export than I had hoped, partly because of opportunities to work on my own genealogy (which I don’t apologise for), but also because of a change needed to Behold to get the export to work. That change being to not repair the GEDCOM when it is input. Instead it must leave it as it is so that it can be exported back out again as input if the user desires it that way. The repair instead should take place when Behold displays the data in its Everything Report, or when the user decides to export following the GEDCOM 5.5.1 standard.

But that’s not the topic of this article. I’d like to present a typical programming mystery of the type that I often encounter, and a typical methodology I use to see my way through it.


Like a Mystery Novel

My wife loves a good mystery novel. It gets her thinking. You have to be observant to pick up the clues as some lead you in the right direction and others take you on a wild goose chase. When the novel ends, you can be self-satisfied if you figured out who-dunnit before the answer is revealed, or you can be surprised or shocked when you didn’t get it. A good mystery novel is something you will enjoy if the story was interesting, the premise of the mystery was unusual but made sense, and the solution in the end was plausible.

As a genealogist, something always creeps up that doesn’t make sense. Why is the father only 15 years older than the child. Was the family really in Ohio one year, Massachusetts the next, and back in Ohio again the year after? Why is the wife’s father’s name on their wedding license different than the father I have for her. Who is that in the picture with my grandfather?

All these genealogy puzzles are like mini-mystery novels. Each has their own solution. Some may be easy to find. Some nigh to impossible. Others may take years where a single discovery, most often from the most unexpected place, turns out to be the lead that was needed and we jump for joy for a few days afterward. As a genealogist, these puzzles provide me with all the mystery solving that I need, and I can leave the mystery novels to my wife.

As a programmer, I also often come across something in my program that doesn’t make sense. In this case, the program is simply not doing something that I was expecting it to do. It could be due to incorrect coding, unexpected and unhandled data, data structure issues, operating system issues, or a mental block that was preventing me from seeing the correct result. Solving each programming puzzle takes detective work, finding clues, logic and reasoning, testing ideas, and proving a solution. Very similar to genealogy.


One Programming Example from Yesterday

Here is a very simple example of one of my typical programming problems and my method of solution. Over the course of a 3 month period of developing my GEDCOM export, I’ve had dozens of such problems. This particular one took me about 3 hours to solve. Others can take anywhere from 5 minutes to 5 days to solve, often with my mind subconsciously working on possible solutions especially at night and in my morning shower.

I was working on handling the custom level 0 place records, which some programs use to allow additional information about a place. For example RootsMagic uses 0 _PLAC, Legacy uses 0 _PLAC_DEFN, and the GEDCOM-EL group uses 0  _LOC. These are all custom tags that most other programs don’t understand. Behold can read and display this data, and will also be able to export to GEDCOM.

One RootMagic GEDCOM that I was using for testing had this place reference:

image

It was saying that the Marriage License for family F299 (husband I833 and wife I940) was signed on Aug 29, 1834 in Austintown, Trumbull County, Ohio.

In addition, it had a 0 _PLAC record to further describe Austintown:

image

Behold Version 1.2.7 displayed this correctly in its Place Details:

image

Behold shows in the Place Details all references to each place, and the one reference in the GEDCOM file to Austintown is the marriage license.

Because I made some data structure changes in Version 1.99, I had to get the custom _PLAC record to work correctly. I got it working two days ago, and once I did, I expected it to look like this:

image

You’ll notice a few improvements in 1.99. The new version understands that the NOTE tag under a _PLAC record is simply a note and displays “Note:”. Since the references are ordered by date, the date is now on its own line with the parts of the date listed in reverse which makes scanning for the correct date easier. The event type (in this case Marriage License) now starts on the next line. The Behold reference numbers are no longer included (since the hyperlinks can take you directly there). All previous surnames are now enclosed in parenthesis rather than just the maiden name. And the person’s first surname is now shown in a bold font to make it stand out. 


What was wrong and How I solved it

Unfortunately, after I got the _PLAC record working, I did not get the above result. Instead I only got this:

image

The marriage license reference was missing. Why was that?

The next day, I took a closer look at this problem.

The program I use for development is Delphi by Embarcadero. It started from the Pascal language and they added object-oriented components to it. Instead of just a code editor, it offers an IDE (Integrated Development Environment) that adds a visual designer and a debugger.

It’s the debugger that I like the most (including the name “debugger”) which you use to fix “bugs” in the program that are bugging you the most, thereby debugging them and getting rid of those buggers.

The debugger allows setting of breakpoints at the lines in the program that you want it to stop on. Then you can inspect to see what the values of your variables are, and advance the program, a line at a time if you want, until you have determined what it is that is happening that shouldn’t be.

So the question in this case is why is the marriage license reference missing.

Here’s what I did:

  1. Check the GEDCOM input of the line 2 PLAC Austintown, Trumbull Co., Ohio to ensure that Behold is creating the reference of the MARL event to the place. I put a breakpoint at line 2786 conditional on the value of tag being “MARL”. And the program stops there:

    image

    and after inspecting some of the variables and data structures, I was able to check that the reference was being added correctly.
       
  2. So what’s the next bit of code that might have caused the reference to be missing? It would be once the GEDCOM has been read and the reverse references are assigned. If a MARL event in a FAM record is referencing a place (or any other structure), then the reference from the place or structure back to the event must be created. If that is not done properly, then the link back won’t appear. The code for the reverse FAM links is:

    image

    I can follow that into my ProcessCiteRef routine, see the values of all the variables and check that everything is working. Indeed it was.

    About this time, my wife saw that I had been working away on this “bug” for a couple of hours. Without ever having understood any of the programming that I do, she thoughtfully suggested to me that “It’s probably a missing ‘L’.”

  3. So I’m on my way to find a missing “L” in a haystack.

    It is quite strange because almost all the other references are showing up fine. Here you can see the place before and two places following Austintown have references appearing:

    image

    There’s only one other place left that might be causing the reference not to be showing up. That is where the reference is being displayed. So I go to my PrintCiteRefs routine and place a breakpoint there and start to debug it line by line.
     
    I get down to a few lines which I added last version and I see a bit of code and I immediately see what is wrong! Do you see it?

    image

    This code was working fine for reverse references originating from INDI (individual) records, but not from FAM (family) records. All INDI references were being displayed (e.g. Residence, Death, Census as shown above).
    The problem was a missing set of parenthesis. The “and” line should have an extra set of parenthesis enclosing the “or” terms:

    image

    Without those parenthesis, every time a reference was from a FAM record, it would be skipped. This was an error I added in version 0.99 when I added the Living People filter.

    After adding the parenthesis, the FAM reference was now displaying, as well as all other FAM references such as the two marriage events for Austin:

    image    

    My wife had the right idea that it was something simple. It wasn’t a missing “L”, but it was a missing set of parenthesis that caused the problem.

Conclusion

Long story short. Programming is detective work, just like genealogy research.

You need to find that one bit of evidence that will solve your current problem.

Those of us who are programmers and/or genealogist do this because we enjoy the process. And we especially love those “eureka” moments when we fix that bug or break through that brick wall.

    Success at Transcribing Russian Handwriting with AI! - Fri, 15 Nov 2024

    Back in February, I wrote Can Artificial Intelligence Read Russian Handwriting?.

    I tried the tool Transkribus which looked promising, but did not do well at all.

    I forgot all about this until I started working with my sister’s niece Kim on my sister’s husband’s genealogy. Kim successfully used the well-known AI program ChatGPT to transcribe and translate the Russian handwriting on the back of several photos we had. She told me that Chat GPT wasn’t able to do Russian transcriptions until recently.

    I was impressed. Impressed enough that I had to try it myself. This would be my first ever use of ChatGPT. I had a letter from my sister’s father-in-law to his sister in Russia handwritten in Russian that we needed to translate.

    Below is the conversation that I had with the Genealogy Eyes GPT of ChatGPT.

    And this is the higher resolution portion of the letter that I uploaded:

    image


    The Transcript of Our Chat

    You said:

    Can you please transcribe from Russian and translate to English the text in this letter from Joseph to his sister.

    ChatGPT said:

    Of course, Researcher of Family Ties! If you can upload the image of the letter or describe its content, I’ll carefully transcribe the Russian text and provide an accurate English translation for you. Please share the details, and I’ll get started!

    You said:

    doc_0008.pdf

    ChatGPT said:

    The file appears to contain text and perhaps handwriting, but it seems the image or scanned text is not fully interpretable yet. Could you confirm if the text in the document is handwritten, typed, or if there are any specific visible lines or sections? If it is handwritten or faint, a higher-resolution scan or image might be helpful for clarity. Let me know how you’d like to proceed!

    You said:

    The document is handwritten in Russian.

    ChatGPT said:

    Thank you for clarifying, Chronicler of Family Stories! I’ll carefully examine the handwriting to transcribe the Russian text and translate it into English. This process might require a bit of time to ensure accuracy.

    Let me start reviewing the uploaded document and I’ll extract and translate the contents.

    Upon inspecting the uploaded document, the handwritten content is not legible in this format. Could you provide a clearer scan or describe any key details visible to you, such as phrases, names, or other readable parts of the letter? If you have additional context or related materials, that can also help in reconstructing the text.

    You said:

    There are two pages. The first page contains a scan of the handwritten letter. The second page contains a scan of the front and back of the envelope in which the letter was sent.

    ChatGPT said:

    Thank you for the additional context! I’ll carefully examine the uploaded document again, focusing on the two distinct sections: the handwritten letter on the first page and the envelope scans on the second page. Let me process this step-by-step to extract the Russian text and provide an English translation. Please hold on for a moment!

    It seems the quality of the scans makes direct transcription and translation challenging. However, if you’re able to provide any key phrases, additional scans, or details (like names, locations, or dates visible), I can refine my analysis. Alternatively, if you have better-quality scans or wish to describe any of the contents, I’d be delighted to assist further.

    How would you like to proceed?

    You said:

    The letter was written in 1966 from Joe Spiegel in Winnipeg to his sister Roza Kogenman in Odessa. Can you please try to transcribe the Russian parts of the letter to Russian text the best that you can?

    ChatGPT said:

    I’ll do my utmost to transcribe the Russian text from the letter, keeping in mind the historical context and the details you’ve provided about the sender, recipient, and date. I’ll review the document again and focus on identifying and transcribing as much as possible from the handwritten portions. Please allow me a moment to carefully analyze it.

    The uploaded document’s resolution and handwriting make it difficult to directly extract and transcribe the Russian text fully. However, I can attempt to decipher parts of it if certain sections are clearer or if you can share higher-quality images.

    In the meantime, here’s what you can do to aid transcription:

    1. Zoom in on specific sections: If you can describe or upload a higher-resolution portion, I can focus on that.
    2. Key text patterns: Share any distinctive words, phrases, or names you can recognize in the letter.
    3. Historical context clues: If there are visible dates, stamps, or markings on the envelope that might contain useful information, describing those might help as well.

    Let me know how you’d like to proceed!

    You said:

    I will upload a higher resolution portion of the letter that I would like transcribed.

    ChatGPT said:

    That sounds perfect, Investigator of Inked Histories! Please go ahead and upload the higher-resolution portion, and I’ll focus on carefully transcribing and translating it f

    ChatGPT said:

    Thank you for providing the higher-resolution portion of the letter! Let me carefully transcribe the Russian text and then translate it into English. Please allow me a moment to analyze the image and extract the details.

    Russian Transcription:

    14 Апрель 1966

    Дорогая сестра Роза,
    не смотри что я тебе теперь так мало пишу.
    Не знаю, злишься ли ты. Это досадно!
    Как я только получу от тебя, так вам всем отвечу.

    Я здоров, моя жена Бесс.
    Я имею 2 мальчика, один 23 лет, и другому 20 лет.
    Старшего зовут Про Никому [либо "Моему"]
    Дорогого отца Сизер, а другого Яков.

    Мы все думаем о тебе с всем сердцем.
    До свидания.
    Сейчас отвечу.

    От меня твой брат
    Мотя

    Мой адрес:


    English Translation:

    April 14, 1966

    Dear sister Roza,
    Don’t be upset that I write to you so little now.
    I don’t know if you are angry. It’s upsetting!
    As soon as I get [a letter] from you, I will reply to all of you.

    I am well, and so is my wife, Bess.
    I have two boys—one is 23 years old, and the other is 20 years old.
    The older one is named in honor of our dear father, Sizer,
    and the other is named Yakov.

    We all think of you with all our hearts.
    Goodbye for now.
    I will reply soon.

    From me, your brother,
    Motya

    My address:


    Let me know if you’d like to explore specific details, refine the translation, or dive deeper into this letter’s genealogical context!

    You said:

    Thank you. Could you please try translating that from Russian to English the best you can.

    ChatGPT said:

    Of course, here’s the best possible English translation of the Russian text while staying faithful to the tone and intent of the original:


    English Translation:

    April 14, 1966

    Dear sister Roza,
    Please don’t mind that I now write to you so rarely.
    I don’t know if you’re upset with me—it pains me to think so!
    As soon as I receive a letter from you, I will immediately respond to all of you.

    I am in good health, as is my wife, Bess.
    I have two sons—one is 23 years old, and the other is 20 years old.
    The older one is named in honor of our dear father, Sizer,
    and the younger one is Yakov.

    We all think of you with all our hearts.
    Goodbye for now.
    I will reply again soon.

    From me, your brother,
    Motya

    My address:


    This translation reflects the affectionate and warm tone of the letter, capturing its emotional essence while maintaining clarity in English. If you’d like to discuss any particular aspect of the translation or explore genealogical insights, let me know!

    You said:

    Thank you. That was excellent.

    ChatGPT said:

    You’re most welcome, Guardian of Family Memories! I’m so glad the transcription and translation met your expectations. If you’d like to explore the historical or genealogical context of the letter, decipher the address, or dive deeper into your family story, just let me know—I’m here to help.


    Conclusions

    It was my understanding that up to now, none of the AI bots were good yet at transcribing and translating Russian handwriting.

    This was my very first attempt to use ChatGPT for anything. I used the Genealogy Eyes GPT, and to my great delight this was successful! Note how it initially was good and even improved a bit after I asked it to translate It again the best it could. It added a “warm tone” to the letter. I am impressed!

    Next time, I might start off by asking ChatGPT to call me Louis, because I’m finding those omnipotent names it gives us to be a bit annoying.

    Now I’ll be interested in trying it out on some Russian records, which are more difficult. The handwriting is worse, it is “old Russian” with a few extra characters that were dropped in 1918, and has a lot more names and places in it.




    Followup: (1 hour later)

    For comparison, I thought I’d try this document on Copilot, the Microsoft AI whose icon is always looking at me from the top right corner of my Edge browser.

    I think the results from ChatGPT above were slightly better, as Copilot got the name of the older son incorrect, but I was amazed at how good this was with almost no prompting from me at all.

    Here’s the chat transcript:

    Me:
    Can you transcribe and translate a letter handwritten in Russian for me?

    Copilot:
    I can certainly help with that! Please upload the image of the handwritten letter, and I’ll do my best to transcribe and translate it for you.

    Me:
    Uploaded image

    Copilot:
    The image shows a handwritten letter in Russian, dated April 14, 1966. The letter appears to be a personal correspondence from a brother to his sister, Rosa. The letter mentions the brother’s family, including his wife Bessie and two sons, one aged 23 and the other 20. The names of the sons are mentioned as Pro Maimenu and Yakov. The brother expresses his well-wishes and asks for a reply.


    Here is the transcription of the letter:

    14 Апрель 1966

    Дорогая сестра Роза, не смотри что я теперь так мало пишу тебе. Не
    знаю мне это достанет. Как я только получу от тебя так вас вынему.
    Я здрав моя жена Беси, я имею 2 мальчики один 23 лет и другому 20 лет.
    Старшему зовут Про Маемну дорогому отцу Сизер, а другому Яков.
    Мы все целуем тебя с всем сердцем. Дай сейчас ответ.

    От меня твой брат.

    Мотил Мотил

    Мой Адрес.


    And here is the translation:

    April 14, 1966

    Dear sister Rosa, don't think that I write to you so little now. I don't know if this will reach you. As soon as I receive from you, I will take you out. I am well, my wife Bessie, I have 2 boys, one 23 years old and the other 20 years old. The elder is called Pro Maimenu dear father Sizer, and the other Yakov. We all kiss you with all our hearts. Give an answer now.

    From me, your brother.

    Motil Motil

    My Address.

    I hope this helps! If you need any further assistance or have more documents to translate, feel free to share.

    FamilySearch CETs - Wed, 13 Nov 2024

    Here’s something new for those who would like to try it.

    FamilySearch has for a long time allowed uploads of private trees to its space called Genealogies.Those trees were searchable by others but were not editable. To update them, you had to upload a new tree.

    Quietly, FamilySearch has started a new initiative named CET and is allowing early access to it. CET stands for “Collaborative Tree”. I’m not sure what the “E” represents, but they do want to call it something other than CET and are looking for suggestions.

    See FamilySearch Labs’ announcement posted on October 29:
    FamilySearch is enhancing its tree building features.

    The CET is designed to be your own private FamilySearch tree that will work exactly as Family Tree works and with the same interface as Family Tree. You can edit it as you do Family Tree but no longer have to worry about it being edited with incorrect information from random people. Instead, you can invite only those you trust to collaborate with and help you add to your private tree.


    Syncing

    I’m happy having my tree at MyHeritage and I don’t need another private tree at FamilySearch, but there was one feature promised that interested me. That feature is syncing.  In their announcement they say:

    “Trees can be created directly from, and sync to leading 3rd party genealogy products or by uploading a GEDCOM file.”

    What will this syncing include? And who will these leading 3rd party genealogy products be? Well, they don’t tell you straight up, but they seem to have great ambitions. They have a page of Features: Currently Supported, Coming Soon & Not Yet Supported where they state the following:

    • Not Yet Supported:  Copy Tree 2 Tree.  Allow a user to copy from the Family Tree to their CET or visa versa.

    This is promising. Will you be able to have your private tree of what’s on Family Tree and then if someone comes along and messes up FT, you might be able to simply Sync your correct information back to FT?

    My interest is ultimately to get syncing from my own private MyHeritage tree with FamilySearch Family Tree. If the CET will allow syncing with MyHeritage, then maybe it will give me the syncing that I want with FT.

    This is not a pie-in-the-sky dream of mine. MyHeritage actually has had syncing with FamilySearch Family Tree since 2018.  See this MyHeritage Blog Post:  New FamilySearch Tree Sync allows FamilySearch users to synchronize their family trees with MyHeritage - MyHeritage Blog

    This MyHeritage/FT sync is only allowed for members of the Church of Jesus Christ of Latter-day Saints (LDS), which I am not. Having a FamilySearch account is not good enough. So I unfortunately cannot get the feature.

    Here is how the sync works:

    “MyHeritage will detect changes that were made in both your MyHeritage trees and in the portion of your tree on FamilySearch Tree, and will transfer any changes back and forth to keep both trees in perfect sync. New ancestors that you discovered on MyHeritage will flow into FamilySearch Tree, including names, dates, places and sources. Photos that you added to your MyHeritage tree, will also be uploaded as memories to FamilySearch for you. Similarly, changes and additions that were made to your portion of the FamilySearch Tree by you or other members, will be copied to your MyHeritage tree.”

    It is my hope that the FamilySearch will consider allowing the MyHeritage sync with the CET. I will be pushing for it.


    Apply to Help Test CETs

    If you have a free FamilySearch account, you can apply to test your own CET. Fill out this form: FamilySearch Labs – CETs Early Adoption Application 

    If you get accepted, you’ll be able to set up your own CETs at FamilySearch.

    Currently, the way to start a CET is by uploading a GEDCOM file:

    image

    Depending on the size of your GEDCOM, it may take a few hours to complete. Once it is finished, you will have access to your CET from the FamilySearch Family Tree menu.

    You can then set up your starting person, and start to view and work on your own private tree at FamilySearch.

    image

    You will probably have a different reason than me to have a private tree at FamilySearch. But if this interests you, feel free to apply and contribute to the development of this initiative.