Jump to content


Photo

Sentence structure codes


  • Please log in to reply
9 replies to this topic

#1 Vince41

Vince41
  • Members
  • 33 posts
  • Gender:Male
  • Location:Stratford, Ct, USA

Posted 23 February 2009 - 11:50 AM

Can [:NP:] or [+] be put inside a conditional sentence.

Example: <[PF] weighed [M3]>. <[:NP:] and was [M4] tall.>

Vince

#2 Michael Hannah

Michael Hannah
  • Moderators
  • 2,733 posts
  • Gender:Male
  • Location:Los Ranchos, New Mexico, USA
  • Interests:Genealogy, Computers

Posted 23 February 2009 - 01:58 PM

Best thing is to test it yourself. However your example has problems. <[PF] weighed [M3]> has two variables in the same conditional brackets which is not allowed. Not sure why you would put the NP code in the second phrase as the first will always be there due to PF always existing. Maybe you could explain what you are trying to do and one of us users could suggest something.
Michael
See my book on how I customize TMG My Way.
My website.

#3 John Cardinal

John Cardinal
  • Senior Members
  • 835 posts
  • Location:North Andover, MA

Posted 23 February 2009 - 02:30 PM

Vince,

As far as I know, you can not make either [:NP:] or [+] conditional. I know it is true in Second Site, and I believe it is true in TMG. During the design of the [+] feature, it was made an explicit requirement that the [+] code must be the first text in the sentence of the event, and if you make it conditional then it can't be the first text because at least the "<" character would precede it.

Regarding the multiple variables in a single conditional term, I think that is OK. I do not know if TMG explicitly supports it, but it works in both TMG and in Second Site. In that case, all the variables must have non-empty values or the term will be ignored. So, given this term:

<[PF] weighed [M3]>

PF will not be empty unless the subject has no first name. M3 could be empty. If you don't put text in M3, then the whole term will be ignored and not produce any output.

#4 GenerationGoneBy

GenerationGoneBy
  • Senior Members
  • 887 posts
  • Gender:Female

Posted 23 February 2009 - 03:04 PM

John,
If I am not mistaken, The [:NP:] variable has to be the last thing in the sentence as well, or am I mistaken and it can be followed by another sentence?

#5 John Cardinal

John Cardinal
  • Senior Members
  • 835 posts
  • Location:North Andover, MA

Posted 23 February 2009 - 03:32 PM

Teresa,

As far as I know, there is no restriction that [:NP:] be the last code in the sentence. Here's what TMG help says:

Tip: The [:NP:] code works if entered anywhere in the sentence. To make your sentence structures consistent, you might want to enter the code at the end of the sentence.

And while we're at it, here's part of what TMG help says about [+]:

Note that the second sentence must _start_ with the [+] code. If the [+] code is found at any other position in the sentence, then it is ignored.

The "second sentence" part is a reference to a prior example that is not shown. The [+] code is used as part of an event sequence where the output from the second sentence is appended to the output of the first sentence with no intervening punctuation or spacing.

#6 Vince41

Vince41
  • Members
  • 33 posts
  • Gender:Male
  • Location:Stratford, Ct, USA

Posted 23 February 2009 - 05:14 PM

Best thing is to test it yourself. However your example has problems. <[PF] weighed [M3]> has two variables in the same conditional brackets which is not allowed. Not sure why you would put the NP code in the second phrase as the first will always be there due to PF always existing. Maybe you could explain what you are trying to do and one of us users could suggest something.



Mike,

I'm trying to create a compound sentence with multiple conditional variables such that I can remove puncuation if one of the variables is missing as in the example below. By the way, multiple variables in a conditional statement is allowed. I one or both variables are missing, no statement is created according to John Cardinal.

<[PF] was [M1]>. <[PF] was [M2] long.

[M1] is the birth weight
[M2] is length at birth.

I'd like to concatinate the two statements and drop the second [PF]. It makes it much more readable.

Any Ideas?

Vince

#7 Vince41

Vince41
  • Members
  • 33 posts
  • Gender:Male
  • Location:Stratford, Ct, USA

Posted 23 February 2009 - 05:41 PM

Best thing is to test it yourself. However your example has problems. <[PF] weighed [M3]> has two variables in the same conditional brackets which is not allowed. Not sure why you would put the NP code in the second phrase as the first will always be there due to PF always existing. Maybe you could explain what you are trying to do and one of us users could suggest something.



Mike,

I'm trying to create a compound sentence with multiple conditional variables such that I can remove puncuation if one of the variables is missing as in the example below. By the way, multiple variables in a conditional statement is allowed. I one or both variables are missing, no statement is created according to John Cardinal.

<[PF] was [M1]>. <[PF] was [M2] long.

[M1] is the birth weight
[M2] is length at birth.

I'd like to concatinate the two statements and drop the second [PF]. It makes it much more readable.

Any Ideas?

Vince


To all,

This is the Birth tag I'm trying to create:


Birth


Principal:



[:CR:][:TAB:][P] was born < at [M1]> <[D]> <[L]>. <[PF] was delivered by [R:MD].> <[PF] was delivered by [R:Midwife], a midwife.> <[PF] weighed [M3].> <[PF] was [M4] long.> <[PFS] birth certificate number is [M2]>. <[W] also witnessed [PFS] birth>




Roles:

MD <[R:MD] delivered [P]> < at [M1]> < on [D]> < at [L]>
Midwife <[R:Midwife], a midwife, delivered [P]> < at [M1]> < on [D]> < at [L]>




Memo:

[M1] Time of birth
[M2] Birth certificate number
[M3] Weight at birth
[M4] Height at birth




[W] All other witnesses other than [MD] & [Midwife].




On all the birth certificates I have seen, ( NY, CT, FL, and TX), none have the birth height. You may omit this part of the sentence if you don't want to search out the information.







Example:

Principal: Jean PARKER was born at 7:49 am on 12 Jul 2001 at Portland Hospital, 300 Seaside Ave, Portland, New Haven, Connecticut, USA, 06472, 203-555-5555.. Jean (73) was delivered by Dr Jerry GEORGE (708). Jean's birth weight was 3590 grams. Jean's (73) birth certificate number is A 1234567.




MD: Dr Jerry GEORGE delivered Jean PARKER at 7:49 am on 12 Jul 2001 at Portland Hospital, 300 Seaside Ave, Portland, New Haven, Connecticut, USA, 06472, 203-555-5555




The midwife statement would be the same except the midwife's name would be substituted and identified as such.. The birth place would be substituted for for the hospital address.




Witness statement remains unchanged.

I'd like the underlined statements to read:


Jean weighed 3590 grams and was 27 inches long.


Any help?

Vince

#8 Vince41

Vince41
  • Members
  • 33 posts
  • Gender:Male
  • Location:Stratford, Ct, USA

Posted 23 February 2009 - 07:30 PM

I figured it out. Here's the tag:

[:CR:][:TAB:][P] was born < at [M1]> <[D]> <[L]>. <[PF] was delivered by [R:MD]> <[PF] was delivered by [R:Midwife], a midwife> <, was [M4] long> < and weighed [M3]>. <[PFS] birth certificate number is [M2]>. <[W] also witnessed [PFS] birth>


Now, another problem cropped up. The last sentence , <[W] also witnessed [PFS] birth>, shows up in the birth tag for an individual as, <[P] aslo witnessed [PFS] birth>. I don't know what happened. Any advise.

Vince

#9 John Cardinal

John Cardinal
  • Senior Members
  • 835 posts
  • Location:North Andover, MA

Posted 24 February 2009 - 08:19 AM

Vince,

You can't refer to a witness via the [W] variable in the sentence of a principal. [W] refers to the current person when that person is the subject of the sentence and is a witness. If you want to refer to the people who are assigned the role "Witness", you can add this:

<[R:Witness] also witnessed [PFS] birth>

As you discovered, if you enter [W] for a principal sentence, TMG changes it to [P], which is the equivalent of [W] but for a principal.

#10 Vince41

Vince41
  • Members
  • 33 posts
  • Gender:Male
  • Location:Stratford, Ct, USA

Posted 24 February 2009 - 11:47 AM

Thank you, John.

Vince




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users