Learning first-order rules from data with multiple parts: applications on mining chemical compound data