#! /bin/perl -f
# Classifies the glyphs as parsed by fsg2mor
# Assumes one glyph per line in the format (xxx...)
# Prepends a one-letter class code and a colon
# Class codes:
#   a = (am) (ar) (an) (ak) (ae)
#   g = (bg) (og) (g)
#   D = (dz...); same for H,P,F
#   d = (d...) except (dz...); same for h p f
#   o = ([q]*[o]*[re]*)
#   r = (r) (e) (z) (b)
#   s = (s...)
#   t = (t...)
#   c = (c...)
#   ? = other
/^([a-z0-9]*)$/!s/^/\?:/g
s/^(ai*[mnrek])/a:&/g
s/^([bo]*g)/g:&/g
s/^(dz.*)/D:&/g
s/^(hz.*)/H:&/g
s/^(pz.*)/P:&/g
s/^(fz.*)/F:&/g
s/^(d.*)/d:&/g
s/^(h.*)/h:&/g
s/^(p.*)/p:&/g
s/^(f.*)/f:&/g
s/^(s.*)/s:&/g
s/^(t.*)/t:&/g
s/^([erzb])/r:&/g
s/^([q]*o[re]*)/o:&/g
s/^(c.*)/c:&/g
s/^(.*)/\?:&/g