The way to calculate the weight of each configuration is to use restrictions in the operator. An operator can be restricted to certain occupations of given orbitals. The notation used is the same as the restrictions set for the calculation of the ground-state or spectra.

The way to go is to define the identity operator and restrict it to a given configuration. For example the $d^9$ configuration. If you act then with this operator on a state all determinants that do not have 9 electrons in the d shell will be removed and the expectation value of this operator will be the weight of the $d^9$ configuration.

For example on a basis with a p-shell, a d-shell and a ligand shell (also 10 spin-orbitals) one can define the following operators to measure the weight of the $d^9$ and $d^8$ configuration: