-OcrResultGlyph *ocr(OcrReader *rd, int w, Pixcol cols[]) {
- int nspaces=-w;
- unsigned ctxmap=2; /* uppercase */
+struct OcrCellTypeInfo {
+ unsigned initial, nextword, midword;
+ const char *name;
+};
+const struct OcrCellTypeInfo ocr_celltype_number= {
+ 4,4,4,
+ .name= "number"
+};
+const struct OcrCellTypeInfo ocr_celltype_text= {
+ .initial=2, /* Uppercase */
+ .nextword=3, /* Either */
+ .midword=1, /* Lower only */
+ .name= "text"
+};
+
+const char *ocr_celltype_name(OcrCellType ct) { return ct->name; }
+
+OcrResultGlyph *ocr(OcrReader *rd, OcrCellType ct, int w, Pixcol cols[]) {
+ int nspaces;
+ unsigned ctxmap;