I apologize for the delay in answering. I read your question several times and wanted to be certain that I gave a well thought out answer, with much consideration. I also did a bit of reference work as I wanted to be sure.
There are several possibilities here. Some are physical and the others psychological.
You are correct, personalities are stable and rarely do they fluctuate to an extreme. Unless:
1) There are biochemical issues such as perimenopause or hormonal imbalances.
2) Thyroid issues exist
3) There is a brain lesion caused by stroke, tumor or physical trauma.
The best practice in this case is an immediate rule out of any physical causes. I would encourage all family who have contact with her to press this point home. I am concerned that this could be more than emotional.
However, it is not unheard of (at all) for a traumatic stressor to decompensate a person past his/her ability to control actions and thoughts. We sometimes hear of this a "nervous breakdown" but in fact it is often a form of trauma related psychosis, a brief traumatic reaction due to a loss. We see this in mothers who lost children, families who lost loved ones etc. The key feature is loss and trauma. Your niece has both, in the cancer death of her sister.
What should you do? She needs a physical/medical rule out of other issues. She also should see a grief therapist, what is called a grief and bereavement counselor. She may be in a rage, a stage of grief and loss that often needs professional guidance. If you can, try to ignore the language, and crudeness. It will be difficult, but with either scenario, the biochemical or the psychological, she is past her ability to control these impulses.
Her physician can offer a referral to a therapist. Yes, she may refuse to go and all you can do is encourage. This is very frustrating, but until she is willing to at least try to obtain help, there isn't a sure fire way to get her to see someone; even for the best people in the helping professions this is difficult.
Use lots of "I" statements when you talk with her and express your concerns openly. This may take some time, and I suspect she will be resistant at first, but your openness and willingness to help will wear positively on her over time.