you can get a guitar controller with a MIDI output but wouldn't you be better of getting an electric guitar or violin?
If you mean playing "in the style" of a guitar then again, I think it's best to act like a guitarist. It's just like playing an organ or xylophone sound on a keyboard, I'd always prefer to have the real thing.