Package ai.extend.types
Class ParseRunOutputOcrWordsItem.Builder
- java.lang.Object
-
- ai.extend.types.ParseRunOutputOcrWordsItem.Builder
-
- All Implemented Interfaces:
ParseRunOutputOcrWordsItem._FinalStage,ParseRunOutputOcrWordsItem.BoundingBoxStage,ParseRunOutputOcrWordsItem.ConfidenceStage,ParseRunOutputOcrWordsItem.ContentStage,ParseRunOutputOcrWordsItem.PageNumberStage
- Enclosing class:
- ParseRunOutputOcrWordsItem
public static final class ParseRunOutputOcrWordsItem.Builder extends java.lang.Object implements ParseRunOutputOcrWordsItem.ContentStage, ParseRunOutputOcrWordsItem.BoundingBoxStage, ParseRunOutputOcrWordsItem.ConfidenceStage, ParseRunOutputOcrWordsItem.PageNumberStage, ParseRunOutputOcrWordsItem._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParseRunOutputOcrWordsItem._FinalStageblockId(java.lang.String blockId)Theidof the block (see theBlockschema) this word was assigned to, based on bounding-box overlap.ParseRunOutputOcrWordsItem._FinalStageblockId(java.util.Optional<java.lang.String> blockId)Theidof the block (see theBlockschema) this word was assigned to, based on bounding-box overlap.ParseRunOutputOcrWordsItem.ConfidenceStageboundingBox(BoundingBox boundingBox)The bounding box coordinates of the word.ParseRunOutputOcrWordsItembuild()ParseRunOutputOcrWordsItem.PageNumberStageconfidence(double confidence)The confidence score of the OCR detection for this word, between 0 and 1.ParseRunOutputOcrWordsItem.BoundingBoxStagecontent(java.lang.String content)The text content of the word.ParseRunOutputOcrWordsItem.Builderfrom(ParseRunOutputOcrWordsItem other)ParseRunOutputOcrWordsItem._FinalStagepageNumber(double pageNumber)The page number where the word was detected.
-
-
-
Method Detail
-
from
public ParseRunOutputOcrWordsItem.Builder from(ParseRunOutputOcrWordsItem other)
- Specified by:
fromin interfaceParseRunOutputOcrWordsItem.ContentStage
-
content
public ParseRunOutputOcrWordsItem.BoundingBoxStage content(@NotNull java.lang.String content)
The text content of the word.
The text content of the word.
- Specified by:
contentin interfaceParseRunOutputOcrWordsItem.ContentStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
boundingBox
public ParseRunOutputOcrWordsItem.ConfidenceStage boundingBox(@NotNull BoundingBox boundingBox)
The bounding box coordinates of the word.
The bounding box coordinates of the word.
- Specified by:
boundingBoxin interfaceParseRunOutputOcrWordsItem.BoundingBoxStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
confidence
public ParseRunOutputOcrWordsItem.PageNumberStage confidence(double confidence)
The confidence score of the OCR detection for this word, between 0 and 1.
The confidence score of the OCR detection for this word, between 0 and 1.
- Specified by:
confidencein interfaceParseRunOutputOcrWordsItem.ConfidenceStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
pageNumber
public ParseRunOutputOcrWordsItem._FinalStage pageNumber(double pageNumber)
The page number where the word was detected.
The page number where the word was detected.
- Specified by:
pageNumberin interfaceParseRunOutputOcrWordsItem.PageNumberStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
blockId
public ParseRunOutputOcrWordsItem._FinalStage blockId(java.lang.String blockId)
The
idof the block (see theBlockschema) this word was assigned to, based on bounding-box overlap. Omitted when the word doesn't fall within any block's bounding box.- Specified by:
blockIdin interfaceParseRunOutputOcrWordsItem._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
blockId
public ParseRunOutputOcrWordsItem._FinalStage blockId(java.util.Optional<java.lang.String> blockId)
The
idof the block (see theBlockschema) this word was assigned to, based on bounding-box overlap. Omitted when the word doesn't fall within any block's bounding box.- Specified by:
blockIdin interfaceParseRunOutputOcrWordsItem._FinalStage
-
build
public ParseRunOutputOcrWordsItem build()
- Specified by:
buildin interfaceParseRunOutputOcrWordsItem._FinalStage
-
-