Binding energies of core excitons in semiconductors