Another sentence question for Place Abbreviations

What I’m trying to get to is a sentence that would be Gastonia, NC if there is something in the abbreviation, but Gastonia, Gaston, North Carolina, United States if there isn’t. The default sentence is:

[person] was born< [Date]>< [PlaceDetails]>< [Place]>.

Which I tried changing to:

[person] was born< [Date]>< [PlaceDetails]>< [Place:Short]>.

With no joy, so then I tried:

[person] was born< [Date]>< [PlaceDetails]><?[Place:Short]| < [Place:Short]> | < [Place]>>.

and I got < > when there was place details and < placename > when there wasn’t. Confused.

Whenever you get < > and < placename > it usually means there is something wrong with that part of the sentence or right before.

Think you are missing a | in the 1st place BUT

[person] was born< [Date]>< [PlaceDetails]><?|[Place:Short]| < [Place:Short]> | < [Place]>>.

I think the odd result for PlaceDetails was because there’s an error in the Place expression. Try this:
[person] was born< [Date]>< [PlaceDetails]>< [Place:Short]| [Place]>.

@keithcstone and @TomH so if Keith wants it to say Gastonia, NC when there are place details and Gastonia, Gaston, North Carolina, United States when no place details, doesn’t there have to be a switch for place details also? as I get Gastonia, NC on yours, his and my sentence

A switch on Place Details is probably needed to eliminate the extra space, but since it’s that way in all the standard sentences I left it alone for now.

I have the place and abbreviation working (mostly) now, I was missing a > on a fact.

Oddly, there seems to be separate sentences for people that are married with no descendants. When I get my laptop back up I’ll post a screenshot.

I understood that he wants the sentence to output the place abbreviation if there is a value in that field for the place, else output the place. That switch was not to be dependent on there being a value in Place Detail.

Instead of < [Place:Short]>, try < [Place:Abbrev]>. Took me a little while to figure that out, but that’s how I’ve been using it in RM11.

You can see that even though I’ve changed the sentence for birth it’s not used in all places in the narrative.

1 Like

I haven’t checked but when there is a Birth event at the beginning of the block for a person, RM might use the built-in default template, not the custom. Or you might have a custom sentence for that person’s Birth event (you can have a unique custom sentence for every event for every person, if you work at it long enough).

Hey Tom and Keith-- I have a customized birth fact and I used and added the place fact part above from Tom-- my fact on the edit page said she was born in Gastonia , Gaston, N C, United States and the report says

image

I actually used Gastonia , Gaston, North Carolina, United States on the 2nd fact–So it did work even with a customized birth fact and RM uses your customized birth fact—actually moved the [desc] in the fact several times to get a better read

@keithcstone I’m NOT sure that I am using this in the right way-- I have 2 places listed in my database
Gastonia , Gaston, North Carolina, United States
and
Gastonia , Gaston, N C, United States
with the abbreviation Gaston, NC under this one–then I go in and add the fact sentence to the ones I want to change
[person] was born< [Date]>< [PlaceDetails]>< [Place:Short]| [Place]>

is this correct or is their another way to do this ?

If you set the sentence template for the built-in Birth fact type to:

[person] was born< [Date]>< [PlaceDetails]>< [Place:Short]| [Place]>

and you have the two Places you describe, one with the Abbreviation and one without, then you would select the one according to whether you want the full or abbreviated string. No need to customise the Event sentence itself.

OTOH, if you have to have two Place records for every Place you want an Abbreviation, you might as well have the abbreviated name as the Place name for one of them and the full name for the other, i.e.,

Gastonia, NC

Gastonia, Gaston, North Carolina, United States of America

Pick the Place you want for each event according to where it is in the narrative.

Thanks Tom–appreciate it

And that was what I was thinking-- why would I go to all the trouble of doing this when I could just pick one or the other that would already be in my place list ..
I have to have both for almost any place as even if an ancestor spent all his life in say Clinton, Clinton Co., IA there will be at least one fact that I can’t prove happened in Clinton, Clinton Co., IA-- just Clinton Co..
I realize that Tim and others don’t want to have a report that says Clinton, Clinton Co., IA over and over again-- this does help BUT for me it’s NOT enough variety when I MIGHT have 30 to 50 facts for a person who lived in the same city all his life-- that is why I suggested making a fact that says All the following events occurred in Clinton, Clinton Co., IA UNLESS noted otherwise– then I would just note the different street addresses…

I want one place, long form for searches, short form for reporting. Having multiples defeats the whole purpose.

Electronic searches work best with proper long form names, using an abbreviated name on a birth, death, or marriage would short circuit my work.

And clutter up the Place Index in a report. I wasn’t advocating the use of two records per place. There is no easy solution. Maybe passing the narrative report through AI to reduce repetition while keeping the structure and format would be, some day, at some cost…

I’ve also considered doing massive search and replaces using a macro in Word instead of updating sentences. May still go back to that long term depending on how well sentences work.

I’ve been looking at the AI idea, but the only way to get it to flow right (based on my current expertise) is one family at a time. My efforts trying an entire book at a time have been muddled.

When doing a book with 1000 or so families it may be tedious even with automation, but things are changing every day.

I simply want to have RM produce a reasonable approximation of a final copy to allow reviews / updates before a real final is produced and all the regular editing takes place. Once I do that I can’t really do any RM updates that affect the result.

I wrestled with this issue over 13 years ago and the best I came up with was a SQLite script that customized all the Fact Type sentence templates and every first Event sentence for every person. There was no way I could do it by hand. That was in RM6 and, afaik, the narrative report generator of RM11 is essentially the same. I published it and, on re-reading, I note that more variety might be achieved with regular expressions which SQLite did not support then but there is now an extension that does. The script may still be compatible with RM11 - I haven’t tried it. If you do, be sure you’ve got a backup to which you can return.