Date: Mon, 15 Jul 1996 10:39:26 -0400 From: "Peter N. Schweitzer" Reply-To: "Peter N Schweitzer, Reston, VA " Subject: cns: Element names in text To: mp-users@geochange.er.usgs.gov mp users; I've been thinking about a problem with cns. It tends to get thrown off by element names that appear as the first word on a line in text values. For example, suppose you have a record that contains Attribute_Accuracy: Attribute_Accuracy_Report: Detailed accuracy information is given for each attribute in the section that describes it. Quantitative_Attribute_Accuracy_Assessment: Attribute_Accuracy_Value: 1.234 Attribute_Accuracy_Explanation: Attribute accuracy is the standard deviation of the replicate measurements at each site. When cns gets hold of it, bad things happen. The words "Attribute accuracy" under Attribute_Accuracy_Explanation are taken to be the start of a new Attribute_Accuracy element, and the text "is the standard deviation..." is put into the leftovers file along with the following line. There isn't a general solution to this problem, since cns can only guess what the structure ought to be. For example, we can't tell it to reclassify as text all elements that follow textual values, because then the whole file would be put into the first scalar element found. Up to now my solution has been to advise the operator (that's you) to inspect the input and rephrase the textual values to make sure this doesn't happen. That creates the desired result, of course, but my objective is to reduce your workload, not increase it. If we could assume that bona fide element names are always followed by a colon, this problem would be greatly ameliorated. In the example, the words "Attribute accuracy" would not be recognized as an element because they are not followed by a colon. The down side is that you would have to be sure that all of your real element names were followed by colons. I could make this an option in the input section of the configuration file, and an additional command-line switch could be added to enable this feature on a specific run. So my question for you is would this be helpful for your records? I think you answer yes if many of the records that you are putting through cns have colons following the element names. This would not be useful for records that don't have this regularity. The same feature could be added to mp and xtme, but these programs already have more sophisticated ways to trap this problem, so it is less crucial to find a solution for them, IMO. Please let me know what you think. Peter -- Peter N. Schweitzer (MS 906, U.S. Geological Survey, Reston, VA 22092) (703) 648-6533 FAX: (703) 648-6647 email: pschweitzer@usgs.gov <*>