* Narrative Reports - annoyances
- AdrianBruce
- Megastar
- Posts: 1961
- Joined: 09 Aug 2003 21:02
- Family Historian: V7
- Location: South Cheshire
- Contact:
Narrative Reports - annoyances
One of my pet desires is an effective narrative report. Sure, I'd like to write it all in a word-processor but until I have that time, pressing a few buttons to get a half-way readable narrative is a good idea.
FH's narrative reports are good but there are a few irritations such as quotes around date phrases, inability to output all the bits that GEDCOM can store (such as the Agency associated with an occupation event, which I use for the employer) and failure to create a new paragraph for each event (galling when I have new paragraphs inside notes!).
I tried TCGR but confess myself astonished by the ordering of the result report for an individual:
- basic sentence for all the standard GEDCOM events / attributes first;
- then basic sentence for all the custom tags events / attributes;
- then all the notes for the events / attributes, making them some considerable distance from the basic sentences to which they refer. It's as if the model the TCGR author had in mind for notes was that of a footnote, whereas notes for me expand on the event - e.g. for a wedding they say whose the witnesses were, the type of ceremony, the person carrying it out, etc.
If anyone wants to tell me I got TCGR's parameters wrong, please do so!
Anyone got any better suggestions for a good narrative?
Would FH plug-ins be any use here in improving narratives?
I've skimmed stuff but didn't see any way to break in to the reports. About the only idea I could come up with was to butcher the custom sentence for people using things like Agency - the plug-in would need to replace all such butchered sentences before any narrative report, in order to put the latest values in. Other aspects (e.g. the new paragraphs) might be done with a post-production run in Word Macros if I could mark the necessary spot?
Grateful for any suggestions (and yes, I have voted for the related Wish-List items!)
ID:6237
FH's narrative reports are good but there are a few irritations such as quotes around date phrases, inability to output all the bits that GEDCOM can store (such as the Agency associated with an occupation event, which I use for the employer) and failure to create a new paragraph for each event (galling when I have new paragraphs inside notes!).
I tried TCGR but confess myself astonished by the ordering of the result report for an individual:
- basic sentence for all the standard GEDCOM events / attributes first;
- then basic sentence for all the custom tags events / attributes;
- then all the notes for the events / attributes, making them some considerable distance from the basic sentences to which they refer. It's as if the model the TCGR author had in mind for notes was that of a footnote, whereas notes for me expand on the event - e.g. for a wedding they say whose the witnesses were, the type of ceremony, the person carrying it out, etc.
If anyone wants to tell me I got TCGR's parameters wrong, please do so!
Anyone got any better suggestions for a good narrative?
Would FH plug-ins be any use here in improving narratives?
I've skimmed stuff but didn't see any way to break in to the reports. About the only idea I could come up with was to butcher the custom sentence for people using things like Agency - the plug-in would need to replace all such butchered sentences before any narrative report, in order to put the latest values in. Other aspects (e.g. the new paragraphs) might be done with a post-production run in Word Macros if I could mark the necessary spot?
Grateful for any suggestions (and yes, I have voted for the related Wish-List items!)
ID:6237
- Jane
- Site Admin
- Posts: 8440
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Narrative Reports - annoyances
If you wanted to it would be possible for you to write a complete Narrative report, directly in to Word (using OLE Com), as you can use the sentence function to return the normal sentence for an event and work direct from the database to produce pretty well anything you wanted.
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Narrative Reports - annoyances
Jane's suggestion is valid, but would require a great deal of work to even approach what FH does already, mostly quite well.
I am not even sure if Multimedia images could be inserted into the Report using that technique.
A plugin could assist with Sentence Templates that required data such as Responsible Agency to be incorporated.
For example, a pseudo Template Code such as {agency} could be added to Sentences.
Method 1
The plugin would replace {agency} with say {agencyBritish Telecom} where a Responsible Agency AGNC field existed in the same Fact.
The {agency...} code must be retained so that subsequent runs of the plugin would be able to update the entry.
The resulting Narrative Word-Processor File would require a global Find and Replace using wildcards to replace {agency(*)} with just the 1 wildcard.
Method 2
The plugin would replace {agency} with whatever Responsible Agency AGNC field existed in the same Fact, if any.
The Narrative Report could then be created.
Then you MUST Undo the plugin changes, otherwise the {agency} pseudo Template Code will no longer exist, and the process will not be repeatable.
A plugin cannot help with inserting paragraphs between Facts.
What you could do is insert a pseudo Template Code such as {} at the end of each Sentence Template where you want new paragraph marks.
They could also be inserted at the end of Notes.
The resulting Narrative Report would end sentences with {}. and may have cross-reference superscript digits after the full-stop.
The Word-Processor File could employ a global Find and Replace using wildcards to replace {}.(*) with .1^p to insert the paragraph.
These 'magic' codes would recognise {}.[sup]1,2[/sup] and replace it with .[sup]1,2[/sup] followed by a paragraph mark.
The {} code must be at the end rather than the start of sentences.
If it were at the start, sometimes the first letter is not capitalised.
I am not even sure if Multimedia images could be inserted into the Report using that technique.
A plugin could assist with Sentence Templates that required data such as Responsible Agency to be incorporated.
For example, a pseudo Template Code such as {agency} could be added to Sentences.
Method 1
The plugin would replace {agency} with say {agencyBritish Telecom} where a Responsible Agency AGNC field existed in the same Fact.
The {agency...} code must be retained so that subsequent runs of the plugin would be able to update the entry.
The resulting Narrative Word-Processor File would require a global Find and Replace using wildcards to replace {agency(*)} with just the 1 wildcard.
Method 2
The plugin would replace {agency} with whatever Responsible Agency AGNC field existed in the same Fact, if any.
The Narrative Report could then be created.
Then you MUST Undo the plugin changes, otherwise the {agency} pseudo Template Code will no longer exist, and the process will not be repeatable.
A plugin cannot help with inserting paragraphs between Facts.
What you could do is insert a pseudo Template Code such as {} at the end of each Sentence Template where you want new paragraph marks.
They could also be inserted at the end of Notes.
The resulting Narrative Report would end sentences with {}. and may have cross-reference superscript digits after the full-stop.
The Word-Processor File could employ a global Find and Replace using wildcards to replace {}.(*) with .1^p to insert the paragraph.
These 'magic' codes would recognise {}.[sup]1,2[/sup] and replace it with .[sup]1,2[/sup] followed by a paragraph mark.
The {} code must be at the end rather than the start of sentences.
If it were at the start, sometimes the first letter is not capitalised.
- AdrianBruce
- Megastar
- Posts: 1961
- Joined: 09 Aug 2003 21:02
- Family Historian: V7
- Location: South Cheshire
- Contact:
Narrative Reports - annoyances
Thanks Jane - I think as Tatewise suggests, doing that would be to lose the navigation of the tree that FH provides, so rather throwing out the baby, nay, family, with the bath-water.
If ever I did that, I'd be more inclined to forget the plug-in and just write the whole thing in a language I'm more familiar with - I'd have to read in the GEDCOM file, I know, but it might save me from learning LUA. (I've never programmed in C or any similar language and as a not-entirely-serious aside, have a hearty dislike of both case-sensitive languages [case-sensitivity - why????] and languages that steal the equals sign from maths and use == for the equivalence operator!)
If ever I did that, I'd be more inclined to forget the plug-in and just write the whole thing in a language I'm more familiar with - I'd have to read in the GEDCOM file, I know, but it might save me from learning LUA. (I've never programmed in C or any similar language and as a not-entirely-serious aside, have a hearty dislike of both case-sensitive languages [case-sensitivity - why????] and languages that steal the equals sign from maths and use == for the equivalence operator!)
- AdrianBruce
- Megastar
- Posts: 1961
- Joined: 09 Aug 2003 21:02
- Family Historian: V7
- Location: South Cheshire
- Contact:
Narrative Reports - annoyances
Mike
Thanks for your thoughts. I think your method 1 provides an excellent method of allowing repeated runs, while retaining the ability to use custom sentences for some people. I'd only thought of completely wiping all custom sentences before regenerating from scratch - thus destroying all my custom sentences where they are used now.
It seemed to me that plug-ins couldn't help with inserting paragraphs between facts, but nice to have it confirmed. The pseudo template code for a new paragraph (I want to call it carriage-return-line-feed, which shows you my vintage) was pretty much what I was thinking of but your comment 'The {} code must be at the end rather than the start of sentences. If it were at the start, sometimes the first letter is not capitalised' is important since I was thinking of sticking it at the front.
Doing a regular post-process run in Word doesn't seem to be an issue to me - in fact, I could even turn annotations inside notes into italicised text, etc....
Thanks for your thoughts. I think your method 1 provides an excellent method of allowing repeated runs, while retaining the ability to use custom sentences for some people. I'd only thought of completely wiping all custom sentences before regenerating from scratch - thus destroying all my custom sentences where they are used now.
It seemed to me that plug-ins couldn't help with inserting paragraphs between facts, but nice to have it confirmed. The pseudo template code for a new paragraph (I want to call it carriage-return-line-feed, which shows you my vintage) was pretty much what I was thinking of but your comment 'The {} code must be at the end rather than the start of sentences. If it were at the start, sometimes the first letter is not capitalised' is important since I was thinking of sticking it at the front.
Doing a regular post-process run in Word doesn't seem to be an issue to me - in fact, I could even turn annotations inside notes into italicised text, etc....
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Narrative Reports - annoyances
Note that with Method 1 the Plugin would have to recognise both custom sentences for some people and global Sentence Templates extracted from the Fact Set definition files.
The Ranking of the Fact Set definitions and any Hidden Facts would have to be handled.
After processing pseudo Template Codes such as {agency} the results would become a Custom Sentence for those people.
Usually Sentence Templates do NOT end with a full-stop because the full-stop is automatically generated.
The Plugin could add an explicit full-stop to the end of its Custom Sentences which inhibits the automatic full-stop.
This way the Plugin can differentiate its Custom Sentences from manually entered Custom Sentences.
This has several consequences:
The Plugin can completely replace pseudo Template Codes with whatever text is required.
This removes the need for Word-Processor post processing.
The Plugin Custom Sentences would be disregarded on subsequent runs, and replaced by global Sentence Templates from Fact Sets.
There are various CRLF conventions in Word-Processors such as MS Word as follows:-
The most popular is the new Paragraph created by pressing Return or Enter, displayed as ¶, and represented in Find and Replace by the ^p code.
A Paragraph has an associated Style that includes Spacing Before/After, Line Spacing, Indentation, Page break before, etc, etc.
Less well known is a Manual Line Break created by pressing Shift+Return or Shift+Enter, displayed a bit like <¬, and represented in Find and Replace by the ^l code.
This simply starts a new line, within the same Paragraph, and uses the Paragraph Line Spacing.
This may be a better CRLF format for separating Narrative Fact Sentences.
The Ranking of the Fact Set definitions and any Hidden Facts would have to be handled.
After processing pseudo Template Codes such as {agency} the results would become a Custom Sentence for those people.
Usually Sentence Templates do NOT end with a full-stop because the full-stop is automatically generated.
The Plugin could add an explicit full-stop to the end of its Custom Sentences which inhibits the automatic full-stop.
This way the Plugin can differentiate its Custom Sentences from manually entered Custom Sentences.
This has several consequences:
The Plugin can completely replace pseudo Template Codes with whatever text is required.
This removes the need for Word-Processor post processing.
The Plugin Custom Sentences would be disregarded on subsequent runs, and replaced by global Sentence Templates from Fact Sets.
There are various CRLF conventions in Word-Processors such as MS Word as follows:-
The most popular is the new Paragraph created by pressing Return or Enter, displayed as ¶, and represented in Find and Replace by the ^p code.
A Paragraph has an associated Style that includes Spacing Before/After, Line Spacing, Indentation, Page break before, etc, etc.
Less well known is a Manual Line Break created by pressing Shift+Return or Shift+Enter, displayed a bit like <¬, and represented in Find and Replace by the ^l code.
This simply starts a new line, within the same Paragraph, and uses the Paragraph Line Spacing.
This may be a better CRLF format for separating Narrative Fact Sentences.
- AdrianBruce
- Megastar
- Posts: 1961
- Joined: 09 Aug 2003 21:02
- Family Historian: V7
- Location: South Cheshire
- Contact:
Narrative Reports - annoyances
Thanks again for your thoughts. Of course, all my sentence templates have been adjusted to have a full-stop at the end - my tidy mind didn't realise it wasn't necessary.
Either way, it gives me options to deal with manually entered custom sentences.
And thanks for the comment about ranking fact sets. Important if I were to generalise this.
Either way, it gives me options to deal with manually entered custom sentences.
And thanks for the comment about ranking fact sets. Important if I were to generalise this.
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Narrative Reports - annoyances
Sounds like you are seriously contemplating this Plugin.
FYI:
The Fact Set Ranking is stored in the C:ProgramDataCalico PieFamily HistorianFact TypesStandardGroupIndex.fhdata file.
The Hidden status is stored in the Fact Set .fhf files under each Fact as either Hidden=Y or Hidden=N.
If you needed to remove all the redundant full-stops from the end of your Custom Sentence Templates the a simple one-off Plugin could easily do that.
Perhaps any further discussion should continue under Plugins Discussion Forum.
FYI:
The Fact Set Ranking is stored in the C:ProgramDataCalico PieFamily HistorianFact TypesStandardGroupIndex.fhdata file.
The Hidden status is stored in the Fact Set .fhf files under each Fact as either Hidden=Y or Hidden=N.
If you needed to remove all the redundant full-stops from the end of your Custom Sentence Templates the a simple one-off Plugin could easily do that.
Perhaps any further discussion should continue under Plugins Discussion Forum.
- AdrianBruce
- Megastar
- Posts: 1961
- Joined: 09 Aug 2003 21:02
- Family Historian: V7
- Location: South Cheshire
- Contact:
Narrative Reports - annoyances
While I am seriously contemplating it, I need to read up on the language, dissect a few examples, etc. Liable to take a little time! [rolleyes]