Vince41 0 Report post Posted February 23, 2009 Can [:NP:] or [+] be put inside a conditional sentence. Example: <[PF] weighed [M3]>. <[:NP:] and was [M4] tall.> Vince Share this post Link to post Share on other sites
Michael Hannah 0 Report post Posted February 23, 2009 Best thing is to test it yourself. However your example has problems. 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. Share this post Link to post Share on other sites
John Cardinal 0 Report post Posted February 23, 2009 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 " 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 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. Share this post Link to post Share on other sites
GenerationGoneBy 0 Report post Posted February 23, 2009 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? Share this post Link to post Share on other sites
John Cardinal 0 Report post Posted February 23, 2009 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. Share this post Link to post Share on other sites
Vince41 0 Report post Posted February 24, 2009 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 Share this post Link to post Share on other sites
Vince41 0 Report post Posted February 24, 2009 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 Share this post Link to post Share on other sites
Vince41 0 Report post Posted February 24, 2009 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 Share this post Link to post Share on other sites
John Cardinal 0 Report post Posted February 24, 2009 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: 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. Share this post Link to post Share on other sites
Vince41 0 Report post Posted February 24, 2009 Thank you, John. Vince Share this post Link to post Share on other sites