Document Analysis and Recognition using ILP and the Winnow Algorithm