Anyon Theory In Gapped Many-Body Systems From Entanglement