Chemical Formulas and Compound Classification