  We present a joint theoretical and experimental study on core-level
excitations from the oxygen $K$ edge of $\beta$-Ga$_2$O$_3$. A detailed
analysis of the electronic structure reveals the importance of O-Ga
hybridization effects in the conduction region. The spectrum from O 1$s$ core
electrons is dominated by excitonic effects, which overall redshift the
absorption onset by 0.5 eV, and significantly redistribute the intensity to
lower energies. Analysis of the spectra obtained within many-body perturbation
theory reveals atomic fingerprints of the inequivalent O atoms. From the
comparison of energy-loss near-edge fine-structure (ELNES) spectra computed
with respect to different crystal planes, with measurements recorded under the
corresponding diffraction conditions, we show how the spectral contributions of
specific O atoms can be enhanced while quenching others. These results suggest
ELNES, combined with ab initio many-body theory, as a very powerful technique
to characterize complex systems, with sensitivity to individual atomic species
and to their local environment.
