* Sentence structures
-
TMG_refugee
- Diamond
- Posts: 97
- Joined: 14 Nov 2015 15:44
- Family Historian: V7
Sentence structures
I have only been using FH since early January so if these questions are overly simplistic I apologize. When importing my existing data into FH I get many errors, not the fault of FH, so I am using my time to clean up my existing data so the import will go as clean as possible. In that effort I also need to determine what fact types I can use and if I can create sentence structures that will display the data as I want. In that effort I have created an additional fact type for a census record in FH and I am trying to learn the capabilities of constructing sentences.
I have created the following:
{individual} appeared < in the {date:YEAR} census> as head of household < in {role=Head of Household}'s household> <at {address}> < {place}> <with wife {role=Wife}> . The census was enumerated {date}. <<br>Other household members were: <br>Son: {role(single)=Son}> <<br>Other household members were:<br> Sons: {role(plural)=Son}><<br> Daughter: {role=Daughter}>< <br> Mother: {role=Mother}><<br> Father: {role=father}><<br> Grandson: {role=Grandson}>< <br> Granddaughter: {role=Granddaughter}><br>
When looking at the narrative report in the FH report viewer I get the following:
John Doe was born on March 1, 1880 in Tucumcari, Indiana. He married Mary Washington on January 1, 1900 in Tucumcari. He appeared in the 1940 census as head of household at 75 Main St in Manchester, Vermont with wife Mary Washington. The census was enumerated on July 1, 1940.
Other household members were:
Sons: John Doe and Second Doe
Daughter: Mary Jane Doe
Grandson: Bobby Carpenter
Granddaughter: Sharon Carpenter
He died on April 1, 1950 in Tucumcari.
When I save it in an rtf format and open it with MS Word I get the following:
John Doe was born on March 1, 1880 in Tucumcari, Indiana. He married Mary Washington on January 1, 1900 in Tucumcari. He appeared in the 1940 census as head of household at 75 Main St in Manchester, Vermont with wife Mary Washington. The census was enumerated on July 1, 1940.
Other household members were:
Sons: John Doe and Second Doe
Daughter: Mary Jane Doe
Grandson: Bobby Carpenter
Granddaughter: Sharon Carpenter
He died on April 1, 1950 in Tucumcari.
Question one is there a way to format the output so the indentation in the report viewer is the same as the rtf file in MS Word? I have tried spaces in this example but it looks like FH will suppress leading spaces. Is there anything like tabs that will preserve the spacing?
Question two is about providing the leading text. In this case it is “other household members were:”. I have many different roles to address the various types of relationships within a household. In my example the leading text is associated with sons. If I don’t have at least one son then the text does not appear, Is there a way to test for having other members in the household besides the Head of Household and wife so I can insert that text regardless of who the other roles are?
Question three is if I want to keep the members in a sentence structure rather than the table format how can I deal with commas and when the last one is found so I can eliminate the commas and end the sentence. I have seen several discussions on this site about this question so we can postpone this question until I read all that has been said and if I am still stumped on this issue.
All the facts are purely fictional so there may be misspellings. I thought I posted this yesterday but I can't find it today so I probably did something incorrectly either in the posting yesterday or the searching today.
I have created the following:
{individual} appeared < in the {date:YEAR} census> as head of household < in {role=Head of Household}'s household> <at {address}> < {place}> <with wife {role=Wife}> . The census was enumerated {date}. <<br>Other household members were: <br>Son: {role(single)=Son}> <<br>Other household members were:<br> Sons: {role(plural)=Son}><<br> Daughter: {role=Daughter}>< <br> Mother: {role=Mother}><<br> Father: {role=father}><<br> Grandson: {role=Grandson}>< <br> Granddaughter: {role=Granddaughter}><br>
When looking at the narrative report in the FH report viewer I get the following:
John Doe was born on March 1, 1880 in Tucumcari, Indiana. He married Mary Washington on January 1, 1900 in Tucumcari. He appeared in the 1940 census as head of household at 75 Main St in Manchester, Vermont with wife Mary Washington. The census was enumerated on July 1, 1940.
Other household members were:
Sons: John Doe and Second Doe
Daughter: Mary Jane Doe
Grandson: Bobby Carpenter
Granddaughter: Sharon Carpenter
He died on April 1, 1950 in Tucumcari.
When I save it in an rtf format and open it with MS Word I get the following:
John Doe was born on March 1, 1880 in Tucumcari, Indiana. He married Mary Washington on January 1, 1900 in Tucumcari. He appeared in the 1940 census as head of household at 75 Main St in Manchester, Vermont with wife Mary Washington. The census was enumerated on July 1, 1940.
Other household members were:
Sons: John Doe and Second Doe
Daughter: Mary Jane Doe
Grandson: Bobby Carpenter
Granddaughter: Sharon Carpenter
He died on April 1, 1950 in Tucumcari.
Question one is there a way to format the output so the indentation in the report viewer is the same as the rtf file in MS Word? I have tried spaces in this example but it looks like FH will suppress leading spaces. Is there anything like tabs that will preserve the spacing?
Question two is about providing the leading text. In this case it is “other household members were:”. I have many different roles to address the various types of relationships within a household. In my example the leading text is associated with sons. If I don’t have at least one son then the text does not appear, Is there a way to test for having other members in the household besides the Head of Household and wife so I can insert that text regardless of who the other roles are?
Question three is if I want to keep the members in a sentence structure rather than the table format how can I deal with commas and when the last one is found so I can eliminate the commas and end the sentence. I have seen several discussions on this site about this question so we can postpone this question until I read all that has been said and if I am still stumped on this issue.
All the facts are purely fictional so there may be misspellings. I thought I posted this yesterday but I can't find it today so I probably did something incorrectly either in the posting yesterday or the searching today.
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Sentence structures
You may be expecting too much from the report writer Sentence Templates and there are several scenarios that you should take into account.
Similarly, there are many, many more relationships to the Head of a household than you are catering for.
How are you proposing to produce sentences in the Narrative Report for all those other members of the household?
It is strongly advised that every person in the household has their own Individual Census event.
See how_to:recording_census_records|> Recording from a Census Record which gives the pros and cons.
Rather than use Fact Witnesses to automate descriptive sentences to list household members, it may be simpler to write the text longhand in the Note and use the {note} code or {=GetLabelledText(%FACT.NOTE2%,"Household: ")} function to include it in the sentence as explained in how_to:narrative_report_fact_sentence_templates#custom_fact_fields|> Custom Fact Fields.
- You may get the necessary indent by inserting tab characters after <br> or <para> codes.
To insert a tab hold down the Ctrl key while pressing the Tab key. - You might be able to use the {=TextIf(...)} function to check if there are any Fact Witnesses and conditionally include the text Other household members were:
- I am not sure how to cope with the comma separator problem.
Similarly, there are many, many more relationships to the Head of a household than you are catering for.
How are you proposing to produce sentences in the Narrative Report for all those other members of the household?
It is strongly advised that every person in the household has their own Individual Census event.
See how_to:recording_census_records|> Recording from a Census Record which gives the pros and cons.
Rather than use Fact Witnesses to automate descriptive sentences to list household members, it may be simpler to write the text longhand in the Note and use the {note} code or {=GetLabelledText(%FACT.NOTE2%,"Household: ")} function to include it in the sentence as explained in how_to:narrative_report_fact_sentence_templates#custom_fact_fields|> Custom Fact Fields.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
TMG_refugee
- Diamond
- Posts: 97
- Joined: 14 Nov 2015 15:44
- Family Historian: V7
Re: Sentence structures
Mike,
Re: Sentence structures - thanks for the response
•
Post by tatewise » 28 May 2020 21:28
You may be expecting too much from the report writer Sentence Templates and there are several scenarios that you should take into account.
1. You may get the necessary indent by inserting tab characters after <br> or <para> codes.
To insert a tab hold down the Ctrl key while pressing the Tab key.
(this does not seem to work in my case. Still get the same results)
2. You might be able to use the {=TextIf(...)} function to check if there are any Fact Witnesses and conditionally include the text Other household members were:
( I have not gotten this to work for me yet but I suspect it will work and I can use this for making sure the label is printed.)
3. I am not sure how to cope with the comma separator problem.
The fixed text as head of household is a potential problem because all too often the Principal Individual is NOT the Head of household in the Census. They may be a Servant, Lodger, Visitor, Boarder at a school, Inmate at a prison or workhouse, etc, etc.
( I have only found one case where this is an issue. One great great uncle was incarcerated and showed up on the census of the prison. But can be a problem if you have multiple generations in the same household. Should the 85 year old grandfather be the head or his son or son-in-law Some census have them state the relationship to the head of household which can solve that issue.)
Similarly, there are many, many more relationships to the Head of a household than you are catering for.
( I admit I will need to add many more roles for this to work correctly)
How are you proposing to produce sentences in the Narrative Report for all those other members of the household?
( I have in the actual role for each type of person a sentence that explains the relationship of this person to head of household.)
It is strongly advised that every person in the household has their own Individual Census event.
See Knowledge Base > Recording from a Census Record which gives the pros and cons.
(Many people say stay away from shared events even though it seems that with the census that is exactly what should be done. However I realize that there are many issues with shared events and it’s curious that if there are so many problems why those issues have not been either fixed or the idea of shared events deleted altogether.)
Rather than use Fact Witnesses to automate descriptive sentences to list household members, it may be simpler to write the text longhand in the Note and use the {note} code or {=GetLabelledText(%FACT.NOTE2%,"Household: ")} function to include it in the sentence as explained in Knowledge Base > Custom Fact Fields.
( I have used this method extensively in TMG and it worked great until I needed to move to a new platform. It also does not help if I want to share data with someone else. I spent aa good deal of effort correcting this when I moved off TMG.)
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Top
I think in the end I will continue to learn about all the things that might be possible with FH but I need to reevaluate how I am recording my data. For instance we have two different points of view on Census. Record the census fact or just use the Census as source. Still working on this question.
I really like what I see with FH but it will take me some time to work out how I want to use this functionality.
Thanks to all and I will continue to learn.
Re: Sentence structures - thanks for the response
•
Post by tatewise » 28 May 2020 21:28
You may be expecting too much from the report writer Sentence Templates and there are several scenarios that you should take into account.
1. You may get the necessary indent by inserting tab characters after <br> or <para> codes.
To insert a tab hold down the Ctrl key while pressing the Tab key.
(this does not seem to work in my case. Still get the same results)
2. You might be able to use the {=TextIf(...)} function to check if there are any Fact Witnesses and conditionally include the text Other household members were:
( I have not gotten this to work for me yet but I suspect it will work and I can use this for making sure the label is printed.)
3. I am not sure how to cope with the comma separator problem.
The fixed text as head of household is a potential problem because all too often the Principal Individual is NOT the Head of household in the Census. They may be a Servant, Lodger, Visitor, Boarder at a school, Inmate at a prison or workhouse, etc, etc.
( I have only found one case where this is an issue. One great great uncle was incarcerated and showed up on the census of the prison. But can be a problem if you have multiple generations in the same household. Should the 85 year old grandfather be the head or his son or son-in-law Some census have them state the relationship to the head of household which can solve that issue.)
Similarly, there are many, many more relationships to the Head of a household than you are catering for.
( I admit I will need to add many more roles for this to work correctly)
How are you proposing to produce sentences in the Narrative Report for all those other members of the household?
( I have in the actual role for each type of person a sentence that explains the relationship of this person to head of household.)
It is strongly advised that every person in the household has their own Individual Census event.
See Knowledge Base > Recording from a Census Record which gives the pros and cons.
(Many people say stay away from shared events even though it seems that with the census that is exactly what should be done. However I realize that there are many issues with shared events and it’s curious that if there are so many problems why those issues have not been either fixed or the idea of shared events deleted altogether.)
Rather than use Fact Witnesses to automate descriptive sentences to list household members, it may be simpler to write the text longhand in the Note and use the {note} code or {=GetLabelledText(%FACT.NOTE2%,"Household: ")} function to include it in the sentence as explained in Knowledge Base > Custom Fact Fields.
( I have used this method extensively in TMG and it worked great until I needed to move to a new platform. It also does not help if I want to share data with someone else. I spent aa good deal of effort correcting this when I moved off TMG.)
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Top
I think in the end I will continue to learn about all the things that might be possible with FH but I need to reevaluate how I am recording my data. For instance we have two different points of view on Census. Record the census fact or just use the Census as source. Still working on this question.
I really like what I see with FH but it will take me some time to work out how I want to use this functionality.
Thanks to all and I will continue to learn.
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Sentence structures
The Sentence Template expression below produces the Narrative Report sentence shown later with indents.
The phrase Other household members were: is governed by a {=TextIf(...)} function.
I am not saying this is the finished article, but that my earlier suggestions do work.
<para>{individual} appeared< in the {date:YEAR} census> as head of household< in {role=Head of Household}'s household>< at {address}>< {place}>< with wife {role=Wife}>. The census was enumerated {date}. <br>{=TextIf(Exists(%FACT._SHAR%) and Not(%FACT._SHAR.ROLE% = "Wife") or Exists(%FACT._SHAR[2]%)," Other household members were:","")}<<br> Son: {role(single)=Son}><<br> Sons: {role(plural)=Son}><<br> Daughter: {role=Daughter}><<br> Mother: {role=Mother}><<br> Father: {role=father}><<br> Grandson: {role=Grandson}><<br> Granddaughter: {role=Granddaughter}><para>
The code version below retains the tab characters that were inserted using Ctrl + Tab keys so you can copy & paste.
As your expression gets more & more complex to cater for all possible relationships, etc, etc, you will probably run into the limit of 1,000 characters allowed per Sentence Template. I think it has been reported to Calico Pie but cannot say when it might get extended.
FYI: Among my 152 Census records there are 7 Servant, 6 Boarder, 3 Lodger, 2 Visitor, 2 Patient, 1 Inmate.
So it is likely that you will encounter more than just one such relationship for your ancestors.
Bear in mind that the 1841 Census and 1939 Register do NOT record Head of household or any family relationships, so your proposed expression would not be suitable for those two years.
Have you considered how you want the surname of married women to appear in the Narrative Report?
They may appear both as Wife to Head of household, or Head of household themself when widowed.
They may also be married more than once. In sample sentence above she is actually Jane MUNRO in that Census.
Shared Fact Witnesses have their uses, but I consider all persons enumerated in a Census as equal Principals rather than one Principal and multiple Witnesses. Whereas for a Marriage it is clear there are two Principals and multiple Witnesses with Roles such as Best man, Bridesmaid, Witness, Minister, etc.
If every person has a Census Event for every Census they appear in from birth to death then it is much easier to analyse and report which Census years have been found and which are missing. Whereas, if they start being Son Witnesses, and then Head with own Census Event, and end as say Grandfather Witness the analysis is much more complex. It is even worse for females, as they may not have any Census Events at all, even though they appear in every Census either as Daughter or Wife.
The phrase Other household members were: is governed by a {=TextIf(...)} function.
I am not saying this is the finished article, but that my earlier suggestions do work.
<para>{individual} appeared< in the {date:YEAR} census> as head of household< in {role=Head of Household}'s household>< at {address}>< {place}>< with wife {role=Wife}>. The census was enumerated {date}. <br>{=TextIf(Exists(%FACT._SHAR%) and Not(%FACT._SHAR.ROLE% = "Wife") or Exists(%FACT._SHAR[2]%)," Other household members were:","")}<<br> Son: {role(single)=Son}><<br> Sons: {role(plural)=Son}><<br> Daughter: {role=Daughter}><<br> Mother: {role=Mother}><<br> Father: {role=father}><<br> Grandson: {role=Grandson}><<br> Granddaughter: {role=Granddaughter}><para>
The code version below retains the tab characters that were inserted using Ctrl + Tab keys so you can copy & paste.
Code: Select all
<para>{individual} appeared< in the {date:YEAR} census> as head of household< in {role=Head of Household}'s household>< at {address}>< {place}>< with wife {role=Wife}>. The census was enumerated {date}. <br>{=TextIf(Exists(%FACT._SHAR%) and Not(%FACT._SHAR.ROLE% = "Wife") or Exists(%FACT._SHAR[2]%)," Other household members were:","")}<<br> Son: {role(single)=Son}><<br> Sons: {role(plural)=Son}><<br> Daughter: {role=Daughter}><<br> Mother: {role=Mother}><<br> Father: {role=father}><<br> Grandson: {role=Grandson}><<br> Granddaughter: {role=Granddaughter}><para>
FYI: Among my 152 Census records there are 7 Servant, 6 Boarder, 3 Lodger, 2 Visitor, 2 Patient, 1 Inmate.
So it is likely that you will encounter more than just one such relationship for your ancestors.
Bear in mind that the 1841 Census and 1939 Register do NOT record Head of household or any family relationships, so your proposed expression would not be suitable for those two years.
Have you considered how you want the surname of married women to appear in the Narrative Report?
They may appear both as Wife to Head of household, or Head of household themself when widowed.
They may also be married more than once. In sample sentence above she is actually Jane MUNRO in that Census.
Shared Fact Witnesses have their uses, but I consider all persons enumerated in a Census as equal Principals rather than one Principal and multiple Witnesses. Whereas for a Marriage it is clear there are two Principals and multiple Witnesses with Roles such as Best man, Bridesmaid, Witness, Minister, etc.
If every person has a Census Event for every Census they appear in from birth to death then it is much easier to analyse and report which Census years have been found and which are missing. Whereas, if they start being Son Witnesses, and then Head with own Census Event, and end as say Grandfather Witness the analysis is much more complex. It is even worse for females, as they may not have any Census Events at all, even though they appear in every Census either as Daughter or Wife.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
TMG_refugee
- Diamond
- Posts: 97
- Joined: 14 Nov 2015 15:44
- Family Historian: V7
Re: Sentence structures
Mike, Thanks for your response. ( I thought this already went but I see that it did not - sorry)
I obviously made some error if my results disagree with yours. I will use your latest code and see if I can manage to do that without making mistakes.
I deal with mostly US Census records so my cutoff year is 1850. Before that there is only the principal and numbers of other types and ages for other members in that house. Also I will build roles for everyone I encounter that has some significance but I will create a role called "household members" as a catchall for these other people. I can always add to the sentence as I encounter more types of people.
Thanks for the 1,000 character limit warning, I will keep that in mind. How does that limit apply? Is it to a single sentence or does it include every sentence for every role in a fact type? I am assuming that it applies to one sentence structure only or I would have probably already reached that character limit.
The one thing this has instigated is a discussion between my wife and I. She is also and avid genealogist. The discussion is about what to do with census data. Use it as an event of its own or use it as a source for other events, like birth, age, data of birth, residence, etc. This may change the way I have been recording census data and do it more closely aligned with your method.
Today will be an interrupted schedule since we will be watching the launch of the Space X rocket. I was very often glued to the TV in the 1960s to watch all the events that led to our landing on the moon. Therefore my responses may be delayed.
I obviously made some error if my results disagree with yours. I will use your latest code and see if I can manage to do that without making mistakes.
I deal with mostly US Census records so my cutoff year is 1850. Before that there is only the principal and numbers of other types and ages for other members in that house. Also I will build roles for everyone I encounter that has some significance but I will create a role called "household members" as a catchall for these other people. I can always add to the sentence as I encounter more types of people.
Thanks for the 1,000 character limit warning, I will keep that in mind. How does that limit apply? Is it to a single sentence or does it include every sentence for every role in a fact type? I am assuming that it applies to one sentence structure only or I would have probably already reached that character limit.
The one thing this has instigated is a discussion between my wife and I. She is also and avid genealogist. The discussion is about what to do with census data. Use it as an event of its own or use it as a source for other events, like birth, age, data of birth, residence, etc. This may change the way I have been recording census data and do it more closely aligned with your method.
Today will be an interrupted schedule since we will be watching the launch of the Space X rocket. I was very often glued to the TV in the 1960s to watch all the events that led to our landing on the moon. Therefore my responses may be delayed.
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Sentence structures
Earlier you requested a sentence where the Fact Witnesses were combined together and separated with commas.
The CODE below will do that provided there is at least one son, otherwise, there is an extra comma before the first relative.
That could be fixed with =TextIf(...) but only if the Fact Witnesses are in same order as the Sentence Template phrases.
Sorry, I wrongly assumed you were discussing UK Census rather than USA Census records, but I am still suprised you have found only one case where your principal relative is not head of household.
The 1,000 character limit applies to the whole Sentence Template expression, but you get no warning, and it only gets truncated when you close and re-open FH
So everything seems to be working until you restart FH and then ends of sentences misbehave. My sample Sentence Templates are approaching 600 characters. Surprisingly, as far as I can tell, that limit has not been reported to Calico Pie so I will do that today.
In your experiments with Sentence Templates for Fact Witnesses don't forget to check the Narrative Report sentences for each of the linked relatives. They have their own Witness Sentence Template field for each Role as explained in how_to:narrative_report_fact_sentence_templates|> Narrative Report Fact Sentence Templates.
Regarding the discussion with your wife, typically most source documents will yield multiple Facts with Citations of the one Source record. Census records often yield more Facts than any other type of source, including Birth Date & Place, Residence Address, Occupation, etc, for several people. Have you discovered ancestralsources:index|> Ancestral Sources that helps create all those Facts and Citations for one Source record?
The CODE below will do that provided there is at least one son, otherwise, there is an extra comma before the first relative.
That could be fixed with =TextIf(...) but only if the Fact Witnesses are in same order as the Sentence Template phrases.
Code: Select all
<para>{individual} appeared< in the {date:YEAR} census> as head of household< in {role=Head of Household}'s household>< at {address}>< {place}>< with wife {role=Wife}>. The census was enumerated {date}.{=TextIf(Exists(%FACT._SHAR%) and Not(%FACT._SHAR.ROLE% = "Wife") or Exists(%FACT._SHAR[2]%)," Other household members were","")}< son {role(single)=Son}>< sons {role(plural)=Son}><, daughter {role=Daughter}><, mother {role=Mother}><, father {role=Father}><, grandson {role=Grandson}><, granddaughter {role=Granddaughter}>.<para>The 1,000 character limit applies to the whole Sentence Template expression, but you get no warning, and it only gets truncated when you close and re-open FH
In your experiments with Sentence Templates for Fact Witnesses don't forget to check the Narrative Report sentences for each of the linked relatives. They have their own Witness Sentence Template field for each Role as explained in how_to:narrative_report_fact_sentence_templates|> Narrative Report Fact Sentence Templates.
Regarding the discussion with your wife, typically most source documents will yield multiple Facts with Citations of the one Source record. Census records often yield more Facts than any other type of source, including Birth Date & Place, Residence Address, Occupation, etc, for several people. Have you discovered ancestralsources:index|> Ancestral Sources that helps create all those Facts and Citations for one Source record?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- LornaCraig
- Megastar
- Posts: 2996
- Joined: 11 Jan 2005 17:36
- Family Historian: V7
- Location: Oxfordshire, UK
Re: Sentence structures
The answer is that for genealogists it is both. It is certainly one of the richest sources we have for 'other' information (including even how honest someone was!) and as the taking of the census is something which happened we record it as an event. But it's really a national event rather than an individual one. At the individual level its status as an event is a bit artificial. I prefer to think of it as a 'snapshot' of a person's circumstances on a particular day. Would you think of a snapshot as an event in itself? It is certainly not a 'life event'.The discussion is about what to do with census data. Use it as an event of its own or use it as a source for other events, like birth, age, data of birth, residence, etc.
Consider this: if you were asked to summarise your own life you would probably include birth, education, various residences, occupation(s), marriage, births of children, illness or deaths of close relatives, part time or voluntary activities etc. But would it ever occur to you to say "and on these particular dates I was recorded in a census"? The same is true for many witness roles. (This is one reason why I don't use witnesses). For example the birth of a child or the death of a close relative is a major landmark, but the fact that you were the person who registered the birth or death is not. You are unlikely to include the registration event in the summary of your life.
Lorna