You are here: Menu Commands > File tools > Classify strings by text
GEOVIA Surpac

Classify strings by text

It is often desirable to be able to classify strings based upon text values contained in the description fields D1 to D100. For example the text values could be assays which signify no sample, or below detection (eg N/S, <0.1). You can use CLASSIFY STRINGS BY TEXT to write these values to the same string.

To run this function: Choose File tools > Classify strings by text, or...

  • In the Function Chooser, type CLASSIFY STRINGS BY TEXT, and press ENTER.

Define the input files
Location, ID Range and String range

Identify a range of files to be classified.

Define the output files
Location and ID Range

Identify the output location and range of files to be created. The output range must equal the number of input values. For example:
input 400, 500, 10
output 1, 20, 2

Define classification information
Classifying field

Select the description field to classify on. This can be D1 through to D100.

Classify by

You can classify by strings, segments and points. If you classify by strings or segments then only the description of the first point in the segment or string is used for the classification. If you use the String or Segment classification method the segment structure will be maintained in the output files.

When classifying by point the description of each point in the file is processed. When classifying by point the segment structure is not maintained in the output files.

Case sensitive

Answer 'Y' if your data is case dependent otherwise answer 'N'.

String, From and To

This is were you determine the classification of your input files. Nominate an output string number for each text classification you want to perform.

The From field serves two purposes. If you do not enter a value in the corresponding To field, then an equals style match will be performed. For example if you enter the text 'N/S' then only descriptions which contain the text 'N/S' will be classified into this string.

If you want to classify between a range of values enter the start of the text range in the From field and the end of the range in the To field. For example if you have the range 'A' to 'E', then all descriptions matching 'A', 'B', 'C', and 'D' will be classified.

You can use standard wildcard characters to match text. The valid characters are:

  • ? match any single character.
  • * match any string of zero or more characters
  • [..] match any single character from the enclosed set. For example [a-z] would match any character in the inclusive range 'a' to 'z'. If the first character after the initial bracket is the exclamation '!' then the effect of the range is negated. For example [!m-n] would match all characters other than 'm' and 'n'.

The order in which you specify the actual classifications is also important. For example if you wanted to classify into different strings all points with descriptions beginning with the values 'C*', 'CA*' and put all other points into another string then you would need to specify the 'From'' value in the following order - 'CA*' then 'C*, and on the next row '*'.

Result

The result will be a range of output files which have been classified according to your specifications.