A computer-implemented method comprising: receiving device identification data that identifies a scanning device and initial scan data generated by the scanning device; performing optical character recognition, OCR, on the initial scan data to produce OCR data; determining a first set of rules that is mapped to a context to which the device identification data is mapped and that defines, for a set of one or more characters, a set of one or more replacement characters; generating corrected OCR data by applying the first set of rules to the OCR data; performing natural language translation on the processed OCR data; determining a second set of rules that is mapped to a context to which the device identification data is mapped and that defines, for a set of one or more characters, a set of one or more replacement characters; and generating corrected natural language translation data by applying the second set of rules to the natural language translated data; wherein determining the first or second set of rules that is mapped to the context to which the device identification data is mapped comprises selecting a particular rules table from a plurality of rules tables that comprise a first rules table containing rules that are applicable to OCR documents and a second rules table containing rules that are applicable to translation documents; and selecting, from the particular rules table, only rules that are mapped to the context to which the device identification data is mapped; wherein the particular rules table comprises at least one rule that is mapped to a context other than the context to which the device identification data is mapped. receiving device identification data that identifies a scanning device and initial scan data generated by the scanning device; performing optical character recognition, OCR, on the initial scan data to produce OCR data; determining a first set of rules that is mapped to a context to which the device identification data is mapped and that defines, for a set of one or more characters, a set of one or more replacement characters; generating corrected OCR data by applying the first set of rules to the OCR data; performing natural language translation on the processed OCR data; determining a second set of rules that is mapped to a context to which the device identification data is mapped and that defines, for a set of one or more characters, a set of one or more replacement characters; and generating corrected natural language translation data by applying the second set of rules to the natural language translated data; wherein determining the first or second set of rules that is mapped to the context to which the device identification data is mapped comprises selecting a particular rules table from a plurality of rules tables that comprise a first rules table containing rules that are applicable to OCR documents and a second rules table containing rules that are applicable to translation documents; and selecting, from the particular rules table, only rules that are mapped to the context to which the device identification data is mapped; wherein the particular rules table comprises at least one rule that is mapped to a context other than the context to which the device identification data is mapped.