It can be difficult to curb biting in some children. When we had this happening in our toddler groups, here is what I did:
Keep teething toys handy. When kiddo does the big "open mouth, moving in for the bite", we'd offer a teething toy.'You can bite this'. Sometimes, biting is to relieve pain from emerging teeth, and teeth can be moving way below the gumline, so even nonemergent teeth can cause pain.
Keep the response minimal. If the child bites me, I put them down in a safe place and hand them the teething toy. "You may not bite me. You may bite this."
It's very important *not* to shout, get upset, talk talk talk or provide an emotional response. I know, I know-- it seems impossible, but I'm on target here-- the more response you give, the more interesting the moment becomes, the more likely your little one is to bite again simply out of curiosity.
When my son would bite during nursing, I'd say 'Let go', remove him from the breast, "you may not bite me, all done boo boos" (which was our term for nursing) put him down and walk away. (I wouldn't offer teethers at this time, as the message was "I do not interact with you when you do this".)
That said, we were alone and no other children were present as possible targets.
So that's my strong suggestion: be proactive when you can, move your child when necessary and keep your responses as minimal as possible.
And just to be clear: biting back, hitting, slapping, flicking or any kind of physical punishment is only going to confuse things for your little one. And just to put your mind at ease: Your little girl is pretty typical in this regard. A lot of kids bite. We teachers have to keep a special eye out when a child goes through a biting phase. And if it happens at school, the teachers should be spending more time comforting the hurt child and very little time discussing it with your daughter. At this age, a lot of words don't work. "Biting hurts. You may not bite." is simple and doesn't reward the biting with lots of corrective attention.