1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/vision/v1/text_annotation.proto 18 19 package com.google.cloud.vision.v1; 20 21 public interface WordOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Word) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Additional information detected for the word. 31 * </pre> 32 * 33 * <code>.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;</code> 34 * 35 * @return Whether the property field is set. 36 */ hasProperty()37 boolean hasProperty(); 38 /** 39 * 40 * 41 * <pre> 42 * Additional information detected for the word. 43 * </pre> 44 * 45 * <code>.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;</code> 46 * 47 * @return The property. 48 */ getProperty()49 com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); 50 /** 51 * 52 * 53 * <pre> 54 * Additional information detected for the word. 55 * </pre> 56 * 57 * <code>.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;</code> 58 */ getPropertyOrBuilder()59 com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); 60 61 /** 62 * 63 * 64 * <pre> 65 * The bounding box for the word. 66 * The vertices are in the order of top-left, top-right, bottom-right, 67 * bottom-left. When a rotation of the bounding box is detected the rotation 68 * is represented as around the top-left corner as defined when the text is 69 * read in the 'natural' orientation. 70 * For example: 71 * * when the text is horizontal it might look like: 72 * 0----1 73 * | | 74 * 3----2 75 * * when it's rotated 180 degrees around the top-left corner it becomes: 76 * 2----3 77 * | | 78 * 1----0 79 * and the vertex order will still be (0, 1, 2, 3). 80 * </pre> 81 * 82 * <code>.google.cloud.vision.v1.BoundingPoly bounding_box = 2;</code> 83 * 84 * @return Whether the boundingBox field is set. 85 */ hasBoundingBox()86 boolean hasBoundingBox(); 87 /** 88 * 89 * 90 * <pre> 91 * The bounding box for the word. 92 * The vertices are in the order of top-left, top-right, bottom-right, 93 * bottom-left. When a rotation of the bounding box is detected the rotation 94 * is represented as around the top-left corner as defined when the text is 95 * read in the 'natural' orientation. 96 * For example: 97 * * when the text is horizontal it might look like: 98 * 0----1 99 * | | 100 * 3----2 101 * * when it's rotated 180 degrees around the top-left corner it becomes: 102 * 2----3 103 * | | 104 * 1----0 105 * and the vertex order will still be (0, 1, 2, 3). 106 * </pre> 107 * 108 * <code>.google.cloud.vision.v1.BoundingPoly bounding_box = 2;</code> 109 * 110 * @return The boundingBox. 111 */ getBoundingBox()112 com.google.cloud.vision.v1.BoundingPoly getBoundingBox(); 113 /** 114 * 115 * 116 * <pre> 117 * The bounding box for the word. 118 * The vertices are in the order of top-left, top-right, bottom-right, 119 * bottom-left. When a rotation of the bounding box is detected the rotation 120 * is represented as around the top-left corner as defined when the text is 121 * read in the 'natural' orientation. 122 * For example: 123 * * when the text is horizontal it might look like: 124 * 0----1 125 * | | 126 * 3----2 127 * * when it's rotated 180 degrees around the top-left corner it becomes: 128 * 2----3 129 * | | 130 * 1----0 131 * and the vertex order will still be (0, 1, 2, 3). 132 * </pre> 133 * 134 * <code>.google.cloud.vision.v1.BoundingPoly bounding_box = 2;</code> 135 */ getBoundingBoxOrBuilder()136 com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); 137 138 /** 139 * 140 * 141 * <pre> 142 * List of symbols in the word. 143 * The order of the symbols follows the natural reading order. 144 * </pre> 145 * 146 * <code>repeated .google.cloud.vision.v1.Symbol symbols = 3;</code> 147 */ getSymbolsList()148 java.util.List<com.google.cloud.vision.v1.Symbol> getSymbolsList(); 149 /** 150 * 151 * 152 * <pre> 153 * List of symbols in the word. 154 * The order of the symbols follows the natural reading order. 155 * </pre> 156 * 157 * <code>repeated .google.cloud.vision.v1.Symbol symbols = 3;</code> 158 */ getSymbols(int index)159 com.google.cloud.vision.v1.Symbol getSymbols(int index); 160 /** 161 * 162 * 163 * <pre> 164 * List of symbols in the word. 165 * The order of the symbols follows the natural reading order. 166 * </pre> 167 * 168 * <code>repeated .google.cloud.vision.v1.Symbol symbols = 3;</code> 169 */ getSymbolsCount()170 int getSymbolsCount(); 171 /** 172 * 173 * 174 * <pre> 175 * List of symbols in the word. 176 * The order of the symbols follows the natural reading order. 177 * </pre> 178 * 179 * <code>repeated .google.cloud.vision.v1.Symbol symbols = 3;</code> 180 */ getSymbolsOrBuilderList()181 java.util.List<? extends com.google.cloud.vision.v1.SymbolOrBuilder> getSymbolsOrBuilderList(); 182 /** 183 * 184 * 185 * <pre> 186 * List of symbols in the word. 187 * The order of the symbols follows the natural reading order. 188 * </pre> 189 * 190 * <code>repeated .google.cloud.vision.v1.Symbol symbols = 3;</code> 191 */ getSymbolsOrBuilder(int index)192 com.google.cloud.vision.v1.SymbolOrBuilder getSymbolsOrBuilder(int index); 193 194 /** 195 * 196 * 197 * <pre> 198 * Confidence of the OCR results for the word. Range [0, 1]. 199 * </pre> 200 * 201 * <code>float confidence = 4;</code> 202 * 203 * @return The confidence. 204 */ getConfidence()205 float getConfidence(); 206 } 207