The raven, B, is a monster in NetHack most notable for its ability to claw at your eyes; fortunately, this will "only" blind you for d6 (more) turns. Ravens have similar erratic movement patterns to bats; players are permanently stunned while polymorphed into ravens.
Having a means of blinding yourself at will or otherwise covering your eyes (e.g. with lenses or a visored helmet) will protect against this; being polymorphed into an eyeless form will also keep you safe. Telepathy is useful to have in any case, but lenses and other similar methods may be more preferable if you rely heavily on engraving Elbereth.
But the raven, sitting lonely on the placid bust, spoke only
That one word, as if his soul in that one word he did outpour.
Nothing further then he uttered -- not a feather then he fluttered--
Till I scarcely more than muttered, 'other friends have flown before--
On the morrow *he* will leave me, as my hopes have flown before.'
Then the bird said, 'Nevermore.'