J.C.
I agree that you should take her to see a doctor. He can check to see if there is a medically-based reason for the behavior, and also if she has been poisoned y lead or contracted any parasite due to the ingestion of dirt. Then once you have found if there is a medical reason for it, you can start working on modifying her behavior to correct the problem. Good luck!