HELP: Remarks - Parse Lithology Composition from Text

The best way to enter the other rock image data is to enter your
description of the bed in the Remarks / Notes / Comments Data Entry
Dialog and build a list of bed descriptions and then select the "
Compute other data entry data types from Remarks" button.

This will allow the program to automatically use the geological
description lookup xml files to parse your text into the rock image
tracks. This basically saves time and effort, instead of entering
each track separately.

A lithology / composition example
"very sandy slightly argillaceous dolomitic limestone; marine
abundant trilobites, echinoderm fragments, corals, few bryozoa, broken
brachiopods; very pale blue (5B8/2) color with moderate blue (5B5/6)
stains; pyrite nodules and concretions, erosional bed".
The phrase "very sandy slightly argillaceous dolomitic limestone" will
be parsed into percent "mineral" composition. Limestone is the main
lithology, very sandy is a primary modifier and slightly argillaceous
& dolomitic are consider a secondary modifiers. The Parse
engine looks for the main lithology and then searches for any modifiers to the
main lithology. The parse engine then assigns a percent value to each "mineral",
as follows,

very sandy = 30% sand

slightly argillaceous = 10% clay

dolomitic = 20% dolomite

limestone = 40% limestone

Basically the main lithology starts at 100% and is reduced by the subsequent
modifiers added to the description, only up to 60% descriptors are allowed.
The hierarchy of percentages are as follows,

A list of Lithology Symbols & Background colors are stored in a
Lithology XML lookup file and illustrated as follows,
Lithology Symbols/Colors
there are a number of sources for lithologic symbols, but for this program
the bulk of the symbols use Shell Oil's 1995 Legend1 and
the Federal Geographic Data Committee lithologic patterns2.