Optical Character Recognition using Bayesian Networks