Package org.apache.tika.parser.pages
Enum Class TextPolicy
- All Implemented Interfaces:
Serializable,Comparable<TextPolicy>,Constable
Where a page's text comes from: the document's own text, OCR of the rendered page, both,
the per-page verdict, or nowhere. The
"text" of PagesConfig.- Since:
- Apache Tika 4.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe document's own text, OCR where the verdict says the page needs it.The document's own text only; never OCR.Both, every page.No text from any source; pages are still rendered for annotators, inference and emission.OCR only; the document's own text is not read. -
Method Summary
Modifier and TypeMethodDescriptionbooleanocrs()Whether a page may be offered to a text recognizer under this policy.static TextPolicyReturns the enum constant of this class with the specified name.static TextPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXTRACT
The document's own text only; never OCR. -
AUTO
The document's own text, OCR where the verdict says the page needs it. -
EXTRACT_AND_OCR
Both, every page. -
OCR
OCR only; the document's own text is not read. -
NONE
No text from any source; pages are still rendered for annotators, inference and emission.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
ocrs
public boolean ocrs()Whether a page may be offered to a text recognizer under this policy.
-