+static int findchar_select_text(const FindCharArgs *fca,
+ const FindCharResults results[]) {
+ if (fca->ctxmap != 017) return -1;
+
+ dbassert(! results[ct_Digit].match );
+ if (results[ct_Word].match) return ct_Word;
+ if (results[ct_Lower].rx > results[ct_Upper].rx) return ct_Lower;
+ if (results[ct_Upper].rx > results[ct_Lower].rx) return ct_Upper;
+ return -1;
+}
+
+const struct OcrCellTypeInfo ocr_celltype_number= {
+ 010,010,010,
+ .space_spaces= 5,
+ .name= "number",
+ .findchar_select= 0
+};
+const struct OcrCellTypeInfo ocr_celltype_text= {
+ .initial= 012, /* Digit|Upper */
+ .nextword= 017, /* Digit|Upper|Lower|Word */
+ .midword= 014, /* Digit|Lower */
+ .space_spaces= 4,
+ .name= "text",
+ .findchar_select= findchar_select_text
+};
+
+