We had a cat who would beg for pets, but when he was done, he would bite and scratch.
I cured him of doing it to me by walking away from him each time he reacted that way.
Cats love attention, and depriving them of it after bad behavior is a humane way to direct/alter them to be polite.
Eventually he would sleep on my lap, and he never scratched or bit me again.
Thanks for the suggestion...however, our cat, if I turn my back on him....runs me down, attacking my legs (and during summer it’s not fun)...I use a water spray bottle now, or a plastic bag (he hates the sound) to scare him off. I watch his eyes...they tell me his mood. If they are small, I can pet him...when they get big it’s time for him to move away from me.