Class RecognizeContentOptions
java.lang.Object
com.azure.ai.formrecognizer.models.RecognizeContentOptions
Options that may be passed when using recognize content APIs on Form Recognizer client.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the type of the form.Get the BCP-47 language code of the text in the document.getPages()Get the custom page numbers for multi-page documents(PDF/TIFF).Get the duration between each poll for the operation status.Get the order in which recognized text lines are returned.setContentType(FormContentType contentType) Set the type of the form.setLanguage(FormRecognizerLanguage language) Set the BCP-47 language code of the text in the document.Set the custom page numbers for multi-page documents(PDF/TIFF).setPollInterval(Duration pollInterval) Set the duration between each poll for the operation status.setReadingOrder(FormReadingOrder readingOrder) Specifies the order in which recognized text lines are returned.
-
Constructor Details
-
RecognizeContentOptions
public RecognizeContentOptions()
-
-
Method Details
-
getContentType
Get the type of the form. Supported Media types including .pdf, .jpg, .png or .tiff type file stream.- Returns:
- the
contentTypevalue.
-
getPollInterval
Get the duration between each poll for the operation status. If none is specified, a default of 5 seconds is used.- Returns:
- the
pollIntervalvalue.
-
setContentType
Set the type of the form. Supported Media types including .pdf, .jpg, .png or .tiff type file stream.- Parameters:
contentType- the provided form content type.- Returns:
- the updated
RecognizeContentOptionsvalue.
-
setPollInterval
Set the duration between each poll for the operation status. If none is specified, a default of 5 seconds is used.- Parameters:
pollInterval- the duration to specify between each poll for the operation status.- Returns:
- the updated
RecognizeContentOptionsvalue.
-
getLanguage
Get the BCP-47 language code of the text in the document. See supported language codes here.- Returns:
- the language code for the text in the document.
-
setLanguage
Set the BCP-47 language code of the text in the document. See supported language codes here.- Parameters:
language- the language code value to set.- Returns:
- the updated
RecognizeContentOptionsvalue.
-
getPages
Get the custom page numbers for multi-page documents(PDF/TIFF). Input the number of the pages you want to get the recognized result for.For a range of pages, use a hyphen, ex - ["1-3"]. Separate each page or a page range with a comma, ex - ["1-3", 4].
- Returns:
- the list of custom page numbers for a multi page document.
-
setPages
Set the custom page numbers for multi-page documents(PDF/TIFF). Input the number of the pages you want to get the recognized result for.For a range of pages, use a hyphen, ex - ["1-3"]. Separate each page or a page range with a comma, ex - ["1-3", 4].
- Parameters:
pages- the custom page numbers value to set.- Returns:
- the updated
RecognizeContentOptionsvalue.
-
getReadingOrder
Get the order in which recognized text lines are returned.- Returns:
- the order in which the recognized lines are returned.
-
setReadingOrder
Specifies the order in which recognized text lines are returned. As the sorting order depends on the detected text, it may change across images and OCR version updates. Thus, business logic should be built upon the actual line location instead of order.- Parameters:
readingOrder- the order specifies in which text lines are returned- Returns:
- the updated
RecognizeContentOptionsvalue.
-