A major security operation was launched in the northern English town of Barnsley after a woman attacked a man with a knife.