private static OCR_RENDERING_STRATEGY parse(String s) {
            if (s == null) {
                return ALL;
            }
            String lc = s.toLowerCase(Locale.US);
            switch (lc) {
                case "vector_graphics_only":
                    return VECTOR_GRAPHICS_ONLY;
                case "text_only":
                    return TEXT_ONLY;
                case "no_text":
                    return NO_TEXT;
                case "all":
                    return ALL;
            }

            StringBuilder sb = new StringBuilder();
            sb.append("I regret that I don't recognize '").append(s);
            sb.append("' as an OCR_STRATEGY. I only recognize:");
            int i = 0;
            for (OCR_RENDERING_STRATEGY strategy : OCR_RENDERING_STRATEGY.values()) {
                if (i++ > 0) {
                    sb.append(", ");
                }
                sb.append(strategy.toString());

            }
            throw new IllegalArgumentException(sb.toString());
        }
Encapsulate the numbers used to control OCR Strategy when set to auto
<p>
If the total characters on the page < this.totalCharsPerPage
or
total unmapped unicode characters on the page > this.unmappedUnicodeCharsPerPage
then we will perform OCR on the page
<p>
If unamppedUnicodeCharsPerPage is an integer > 0, then we compare absolute number of characters.
If it is a float < 1, then we assume it is a percentage and we compare it to the
percentage of unmappedCharactersPerPage/totalCharsPerPage
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-pdf-module/src/main/java/org/apache/tika/parser/pdf/PDFParserConfig.java