ocr

package
v0.0.0-...-5fa7aab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TextRecognitionAsyncService_Recognize_FullMethodName      = "/yandex.cloud.ai.ocr.v1.TextRecognitionAsyncService/Recognize"
	TextRecognitionAsyncService_GetRecognition_FullMethodName = "/yandex.cloud.ai.ocr.v1.TextRecognitionAsyncService/GetRecognition"
)
View Source
const (
	TextRecognitionService_Recognize_FullMethodName = "/yandex.cloud.ai.ocr.v1.TextRecognitionService/Recognize"
)

Variables

View Source
var (
	Angle_name = map[int32]string{
		0: "ANGLE_UNSPECIFIED",
		1: "ANGLE_0",
		2: "ANGLE_90",
		3: "ANGLE_180",
		4: "ANGLE_270",
	}
	Angle_value = map[string]int32{
		"ANGLE_UNSPECIFIED": 0,
		"ANGLE_0":           1,
		"ANGLE_90":          2,
		"ANGLE_180":         3,
		"ANGLE_270":         4,
	}
)

Enum value maps for Angle.

View Source
var File_yandex_cloud_ai_ocr_v1_ocr_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_ai_ocr_v1_ocr_service_proto protoreflect.FileDescriptor
View Source
var TextRecognitionAsyncService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.ai.ocr.v1.TextRecognitionAsyncService",
	HandlerType: (*TextRecognitionAsyncServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Recognize",
			Handler:    _TextRecognitionAsyncService_Recognize_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetRecognition",
			Handler:       _TextRecognitionAsyncService_GetRecognition_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "yandex/cloud/ai/ocr/v1/ocr_service.proto",
}

TextRecognitionAsyncService_ServiceDesc is the grpc.ServiceDesc for TextRecognitionAsyncService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var TextRecognitionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.ai.ocr.v1.TextRecognitionService",
	HandlerType: (*TextRecognitionServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Recognize",
			Handler:       _TextRecognitionService_Recognize_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "yandex/cloud/ai/ocr/v1/ocr_service.proto",
}

TextRecognitionService_ServiceDesc is the grpc.ServiceDesc for TextRecognitionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTextRecognitionAsyncServiceServer

func RegisterTextRecognitionAsyncServiceServer(s grpc.ServiceRegistrar, srv TextRecognitionAsyncServiceServer)

func RegisterTextRecognitionServiceServer

func RegisterTextRecognitionServiceServer(s grpc.ServiceRegistrar, srv TextRecognitionServiceServer)

Types

type Angle

type Angle int32
const (
	Angle_ANGLE_UNSPECIFIED Angle = 0
	Angle_ANGLE_0           Angle = 1
	Angle_ANGLE_90          Angle = 2
	Angle_ANGLE_180         Angle = 3
	Angle_ANGLE_270         Angle = 4
)

func (Angle) Descriptor

func (Angle) Descriptor() protoreflect.EnumDescriptor

func (Angle) Enum

func (x Angle) Enum() *Angle

func (Angle) EnumDescriptor deprecated

func (Angle) EnumDescriptor() ([]byte, []int)

Deprecated: Use Angle.Descriptor instead.

func (Angle) Number

func (x Angle) Number() protoreflect.EnumNumber

func (Angle) String

func (x Angle) String() string

func (Angle) Type

func (Angle) Type() protoreflect.EnumType

type Block

type Block struct {

	// Area on the page where the text block is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Recognized lines in this block.
	Lines []*Line `protobuf:"bytes,2,rep,name=lines,proto3" json:"lines,omitempty"`
	// A list of detected languages
	Languages []*Block_DetectedLanguage `protobuf:"bytes,3,rep,name=languages,proto3" json:"languages,omitempty"`
	// Block position from full_text string.
	TextSegments []*TextSegments `protobuf:"bytes,4,rep,name=text_segments,json=textSegments,proto3" json:"text_segments,omitempty"`
	// contains filtered or unexported fields
}

func (*Block) Descriptor deprecated

func (*Block) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetBoundingBox

func (x *Block) GetBoundingBox() *Polygon

func (*Block) GetLanguages

func (x *Block) GetLanguages() []*Block_DetectedLanguage

func (*Block) GetLines

func (x *Block) GetLines() []*Line

func (*Block) GetTextSegments

func (x *Block) GetTextSegments() []*TextSegments

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) SetBoundingBox

func (m *Block) SetBoundingBox(v *Polygon)

func (*Block) SetLanguages

func (m *Block) SetLanguages(v []*Block_DetectedLanguage)

func (*Block) SetLines

func (m *Block) SetLines(v []*Line)

func (*Block) SetTextSegments

func (m *Block) SetTextSegments(v []*TextSegments)

func (*Block) String

func (x *Block) String() string

type Block_DetectedLanguage

type Block_DetectedLanguage struct {

	// Detected language code.
	LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
	// contains filtered or unexported fields
}

func (*Block_DetectedLanguage) Descriptor deprecated

func (*Block_DetectedLanguage) Descriptor() ([]byte, []int)

Deprecated: Use Block_DetectedLanguage.ProtoReflect.Descriptor instead.

func (*Block_DetectedLanguage) GetLanguageCode

func (x *Block_DetectedLanguage) GetLanguageCode() string

func (*Block_DetectedLanguage) ProtoMessage

func (*Block_DetectedLanguage) ProtoMessage()

func (*Block_DetectedLanguage) ProtoReflect

func (x *Block_DetectedLanguage) ProtoReflect() protoreflect.Message

func (*Block_DetectedLanguage) Reset

func (x *Block_DetectedLanguage) Reset()

func (*Block_DetectedLanguage) SetLanguageCode

func (m *Block_DetectedLanguage) SetLanguageCode(v string)

func (*Block_DetectedLanguage) String

func (x *Block_DetectedLanguage) String() string

type Entity

type Entity struct {

	// Entity name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Recognized entity text.
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*Entity) Descriptor deprecated

func (*Entity) Descriptor() ([]byte, []int)

Deprecated: Use Entity.ProtoReflect.Descriptor instead.

func (*Entity) GetName

func (x *Entity) GetName() string

func (*Entity) GetText

func (x *Entity) GetText() string

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) ProtoReflect

func (x *Entity) ProtoReflect() protoreflect.Message

func (*Entity) Reset

func (x *Entity) Reset()

func (*Entity) SetName

func (m *Entity) SetName(v string)

func (*Entity) SetText

func (m *Entity) SetText(v string)

func (*Entity) String

func (x *Entity) String() string

type GetRecognitionRequest

type GetRecognitionRequest struct {

	// Operation ID of async recognition request.
	OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRecognitionRequest) Descriptor deprecated

func (*GetRecognitionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRecognitionRequest.ProtoReflect.Descriptor instead.

func (*GetRecognitionRequest) GetOperationId

func (x *GetRecognitionRequest) GetOperationId() string

func (*GetRecognitionRequest) ProtoMessage

func (*GetRecognitionRequest) ProtoMessage()

func (*GetRecognitionRequest) ProtoReflect

func (x *GetRecognitionRequest) ProtoReflect() protoreflect.Message

func (*GetRecognitionRequest) Reset

func (x *GetRecognitionRequest) Reset()

func (*GetRecognitionRequest) SetOperationId

func (m *GetRecognitionRequest) SetOperationId(v string)

func (*GetRecognitionRequest) String

func (x *GetRecognitionRequest) String() string

type Line

type Line struct {

	// Area on the page where the line is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Recognized text.
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// Recognized words.
	Words []*Word `protobuf:"bytes,3,rep,name=words,proto3" json:"words,omitempty"`
	// Line position from full_text string.
	TextSegments []*TextSegments `protobuf:"bytes,4,rep,name=text_segments,json=textSegments,proto3" json:"text_segments,omitempty"`
	// Angle of rotate line
	Orientation Angle `protobuf:"varint,5,opt,name=orientation,proto3,enum=yandex.cloud.ai.ocr.v1.Angle" json:"orientation,omitempty"`
	// contains filtered or unexported fields
}

func (*Line) Descriptor deprecated

func (*Line) Descriptor() ([]byte, []int)

Deprecated: Use Line.ProtoReflect.Descriptor instead.

func (*Line) GetBoundingBox

func (x *Line) GetBoundingBox() *Polygon

func (*Line) GetOrientation

func (x *Line) GetOrientation() Angle

func (*Line) GetText

func (x *Line) GetText() string

func (*Line) GetTextSegments

func (x *Line) GetTextSegments() []*TextSegments

func (*Line) GetWords

func (x *Line) GetWords() []*Word

func (*Line) ProtoMessage

func (*Line) ProtoMessage()

func (*Line) ProtoReflect

func (x *Line) ProtoReflect() protoreflect.Message

func (*Line) Reset

func (x *Line) Reset()

func (*Line) SetBoundingBox

func (m *Line) SetBoundingBox(v *Polygon)

func (*Line) SetOrientation

func (m *Line) SetOrientation(v Angle)

func (*Line) SetText

func (m *Line) SetText(v string)

func (*Line) SetTextSegments

func (m *Line) SetTextSegments(v []*TextSegments)

func (*Line) SetWords

func (m *Line) SetWords(v []*Word)

func (*Line) String

func (x *Line) String() string

type Polygon

type Polygon struct {

	// The bounding polygon vertices.
	Vertices []*Vertex `protobuf:"bytes,1,rep,name=vertices,proto3" json:"vertices,omitempty"`
	// contains filtered or unexported fields
}

func (*Polygon) Descriptor deprecated

func (*Polygon) Descriptor() ([]byte, []int)

Deprecated: Use Polygon.ProtoReflect.Descriptor instead.

func (*Polygon) GetVertices

func (x *Polygon) GetVertices() []*Vertex

func (*Polygon) ProtoMessage

func (*Polygon) ProtoMessage()

func (*Polygon) ProtoReflect

func (x *Polygon) ProtoReflect() protoreflect.Message

func (*Polygon) Reset

func (x *Polygon) Reset()

func (*Polygon) SetVertices

func (m *Polygon) SetVertices(v []*Vertex)

func (*Polygon) String

func (x *Polygon) String() string

type RecognizeTextRequest

type RecognizeTextRequest struct {

	// Types that are assignable to Source:
	//
	//	*RecognizeTextRequest_Content
	Source isRecognizeTextRequest_Source `protobuf_oneof:"source"`
	// Specifications of the ([MIME type](https://en.wikipedia.org/wiki/Media_type)). Each specification contains the file to analyze and features to use for analysis. Restrictions:
	// * Supported file formats: `JPEG`, `PNG`, `PDF`.
	// * Maximum file size: 20 MB.
	// * Image size should not exceed 20M pixels (length x width).
	// * The number of pages in a PDF file should not exceed 200 (each page counts as 1 request).
	MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// List of the languages to recognize text.
	// Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `ru`).
	LanguageCodes []string `protobuf:"bytes,3,rep,name=language_codes,json=languageCodes,proto3" json:"language_codes,omitempty"`
	// Model to use for text detection.
	Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`
	// contains filtered or unexported fields
}

func (*RecognizeTextRequest) Descriptor deprecated

func (*RecognizeTextRequest) Descriptor() ([]byte, []int)

Deprecated: Use RecognizeTextRequest.ProtoReflect.Descriptor instead.

func (*RecognizeTextRequest) GetContent

func (x *RecognizeTextRequest) GetContent() []byte

func (*RecognizeTextRequest) GetLanguageCodes

func (x *RecognizeTextRequest) GetLanguageCodes() []string

func (*RecognizeTextRequest) GetMimeType

func (x *RecognizeTextRequest) GetMimeType() string

func (*RecognizeTextRequest) GetModel

func (x *RecognizeTextRequest) GetModel() string

func (*RecognizeTextRequest) GetSource

func (m *RecognizeTextRequest) GetSource() isRecognizeTextRequest_Source

func (*RecognizeTextRequest) ProtoMessage

func (*RecognizeTextRequest) ProtoMessage()

func (*RecognizeTextRequest) ProtoReflect

func (x *RecognizeTextRequest) ProtoReflect() protoreflect.Message

func (*RecognizeTextRequest) Reset

func (x *RecognizeTextRequest) Reset()

func (*RecognizeTextRequest) SetContent

func (m *RecognizeTextRequest) SetContent(v []byte)

func (*RecognizeTextRequest) SetLanguageCodes

func (m *RecognizeTextRequest) SetLanguageCodes(v []string)

func (*RecognizeTextRequest) SetMimeType

func (m *RecognizeTextRequest) SetMimeType(v string)

func (*RecognizeTextRequest) SetModel

func (m *RecognizeTextRequest) SetModel(v string)

func (*RecognizeTextRequest) SetSource

func (*RecognizeTextRequest) String

func (x *RecognizeTextRequest) String() string

type RecognizeTextRequest_Content

type RecognizeTextRequest_Content struct {
	// Bytes with data
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3,oneof"`
}

type RecognizeTextRequest_Source

type RecognizeTextRequest_Source = isRecognizeTextRequest_Source

type RecognizeTextResponse

type RecognizeTextResponse struct {

	// Recognized text blocks in this page or text from entities.
	TextAnnotation *TextAnnotation `protobuf:"bytes,1,opt,name=text_annotation,json=textAnnotation,proto3" json:"text_annotation,omitempty"`
	// Page number in PDF file.
	Page int64 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
	// contains filtered or unexported fields
}

func (*RecognizeTextResponse) Descriptor deprecated

func (*RecognizeTextResponse) Descriptor() ([]byte, []int)

Deprecated: Use RecognizeTextResponse.ProtoReflect.Descriptor instead.

func (*RecognizeTextResponse) GetPage

func (x *RecognizeTextResponse) GetPage() int64

func (*RecognizeTextResponse) GetTextAnnotation

func (x *RecognizeTextResponse) GetTextAnnotation() *TextAnnotation

func (*RecognizeTextResponse) ProtoMessage

func (*RecognizeTextResponse) ProtoMessage()

func (*RecognizeTextResponse) ProtoReflect

func (x *RecognizeTextResponse) ProtoReflect() protoreflect.Message

func (*RecognizeTextResponse) Reset

func (x *RecognizeTextResponse) Reset()

func (*RecognizeTextResponse) SetPage

func (m *RecognizeTextResponse) SetPage(v int64)

func (*RecognizeTextResponse) SetTextAnnotation

func (m *RecognizeTextResponse) SetTextAnnotation(v *TextAnnotation)

func (*RecognizeTextResponse) String

func (x *RecognizeTextResponse) String() string

type Table

type Table struct {

	// Area on the page where the table is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Number of rows in table.
	RowCount int64 `protobuf:"varint,2,opt,name=row_count,json=rowCount,proto3" json:"row_count,omitempty"`
	// Number of columns in table.
	ColumnCount int64 `protobuf:"varint,3,opt,name=column_count,json=columnCount,proto3" json:"column_count,omitempty"`
	// Table cells.
	Cells []*TableCell `protobuf:"bytes,4,rep,name=cells,proto3" json:"cells,omitempty"`
	// contains filtered or unexported fields
}

func (*Table) Descriptor deprecated

func (*Table) Descriptor() ([]byte, []int)

Deprecated: Use Table.ProtoReflect.Descriptor instead.

func (*Table) GetBoundingBox

func (x *Table) GetBoundingBox() *Polygon

func (*Table) GetCells

func (x *Table) GetCells() []*TableCell

func (*Table) GetColumnCount

func (x *Table) GetColumnCount() int64

func (*Table) GetRowCount

func (x *Table) GetRowCount() int64

func (*Table) ProtoMessage

func (*Table) ProtoMessage()

func (*Table) ProtoReflect

func (x *Table) ProtoReflect() protoreflect.Message

func (*Table) Reset

func (x *Table) Reset()

func (*Table) SetBoundingBox

func (m *Table) SetBoundingBox(v *Polygon)

func (*Table) SetCells

func (m *Table) SetCells(v []*TableCell)

func (*Table) SetColumnCount

func (m *Table) SetColumnCount(v int64)

func (*Table) SetRowCount

func (m *Table) SetRowCount(v int64)

func (*Table) String

func (x *Table) String() string

type TableCell

type TableCell struct {

	// Area on the page where the table cell is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Row index.
	RowIndex int64 `protobuf:"varint,2,opt,name=row_index,json=rowIndex,proto3" json:"row_index,omitempty"`
	// Column index.
	ColumnIndex int64 `protobuf:"varint,3,opt,name=column_index,json=columnIndex,proto3" json:"column_index,omitempty"`
	// Column span.
	ColumnSpan int64 `protobuf:"varint,4,opt,name=column_span,json=columnSpan,proto3" json:"column_span,omitempty"`
	// Row span.
	RowSpan int64 `protobuf:"varint,5,opt,name=row_span,json=rowSpan,proto3" json:"row_span,omitempty"`
	// Text in cell.
	Text string `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"`
	// Table cell position from full_text string.
	TextSegments []*TextSegments `protobuf:"bytes,7,rep,name=text_segments,json=textSegments,proto3" json:"text_segments,omitempty"`
	// contains filtered or unexported fields
}

func (*TableCell) Descriptor deprecated

func (*TableCell) Descriptor() ([]byte, []int)

Deprecated: Use TableCell.ProtoReflect.Descriptor instead.

func (*TableCell) GetBoundingBox

func (x *TableCell) GetBoundingBox() *Polygon

func (*TableCell) GetColumnIndex

func (x *TableCell) GetColumnIndex() int64

func (*TableCell) GetColumnSpan

func (x *TableCell) GetColumnSpan() int64

func (*TableCell) GetRowIndex

func (x *TableCell) GetRowIndex() int64

func (*TableCell) GetRowSpan

func (x *TableCell) GetRowSpan() int64

func (*TableCell) GetText

func (x *TableCell) GetText() string

func (*TableCell) GetTextSegments

func (x *TableCell) GetTextSegments() []*TextSegments

func (*TableCell) ProtoMessage

func (*TableCell) ProtoMessage()

func (*TableCell) ProtoReflect

func (x *TableCell) ProtoReflect() protoreflect.Message

func (*TableCell) Reset

func (x *TableCell) Reset()

func (*TableCell) SetBoundingBox

func (m *TableCell) SetBoundingBox(v *Polygon)

func (*TableCell) SetColumnIndex

func (m *TableCell) SetColumnIndex(v int64)

func (*TableCell) SetColumnSpan

func (m *TableCell) SetColumnSpan(v int64)

func (*TableCell) SetRowIndex

func (m *TableCell) SetRowIndex(v int64)

func (*TableCell) SetRowSpan

func (m *TableCell) SetRowSpan(v int64)

func (*TableCell) SetText

func (m *TableCell) SetText(v string)

func (*TableCell) SetTextSegments

func (m *TableCell) SetTextSegments(v []*TextSegments)

func (*TableCell) String

func (x *TableCell) String() string

type TextAnnotation

type TextAnnotation struct {

	// Page width in pixels.
	Width int64 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
	// Page height in pixels.
	Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// Recognized text blocks in this page.
	Blocks []*Block `protobuf:"bytes,3,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// Recognized entities.
	Entities []*Entity `protobuf:"bytes,4,rep,name=entities,proto3" json:"entities,omitempty"`
	Tables   []*Table  `protobuf:"bytes,5,rep,name=tables,proto3" json:"tables,omitempty"`
	// Full text recognized from image.
	FullText string `protobuf:"bytes,6,opt,name=full_text,json=fullText,proto3" json:"full_text,omitempty"`
	// Angle of rotate image
	Rotate Angle `protobuf:"varint,7,opt,name=rotate,proto3,enum=yandex.cloud.ai.ocr.v1.Angle" json:"rotate,omitempty"`
	// contains filtered or unexported fields
}

func (*TextAnnotation) Descriptor deprecated

func (*TextAnnotation) Descriptor() ([]byte, []int)

Deprecated: Use TextAnnotation.ProtoReflect.Descriptor instead.

func (*TextAnnotation) GetBlocks

func (x *TextAnnotation) GetBlocks() []*Block

func (*TextAnnotation) GetEntities

func (x *TextAnnotation) GetEntities() []*Entity

func (*TextAnnotation) GetFullText

func (x *TextAnnotation) GetFullText() string

func (*TextAnnotation) GetHeight

func (x *TextAnnotation) GetHeight() int64

func (*TextAnnotation) GetRotate

func (x *TextAnnotation) GetRotate() Angle

func (*TextAnnotation) GetTables

func (x *TextAnnotation) GetTables() []*Table

func (*TextAnnotation) GetWidth

func (x *TextAnnotation) GetWidth() int64

func (*TextAnnotation) ProtoMessage

func (*TextAnnotation) ProtoMessage()

func (*TextAnnotation) ProtoReflect

func (x *TextAnnotation) ProtoReflect() protoreflect.Message

func (*TextAnnotation) Reset

func (x *TextAnnotation) Reset()

func (*TextAnnotation) SetBlocks

func (m *TextAnnotation) SetBlocks(v []*Block)

func (*TextAnnotation) SetEntities

func (m *TextAnnotation) SetEntities(v []*Entity)

func (*TextAnnotation) SetFullText

func (m *TextAnnotation) SetFullText(v string)

func (*TextAnnotation) SetHeight

func (m *TextAnnotation) SetHeight(v int64)

func (*TextAnnotation) SetRotate

func (m *TextAnnotation) SetRotate(v Angle)

func (*TextAnnotation) SetTables

func (m *TextAnnotation) SetTables(v []*Table)

func (*TextAnnotation) SetWidth

func (m *TextAnnotation) SetWidth(v int64)

func (*TextAnnotation) String

func (x *TextAnnotation) String() string

type TextRecognitionAsyncServiceClient

type TextRecognitionAsyncServiceClient interface {
	// To send the image for asynchronous text recognition.
	Recognize(ctx context.Context, in *RecognizeTextRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// To get recognition results.
	GetRecognition(ctx context.Context, in *GetRecognitionRequest, opts ...grpc.CallOption) (TextRecognitionAsyncService_GetRecognitionClient, error)
}

TextRecognitionAsyncServiceClient is the client API for TextRecognitionAsyncService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type TextRecognitionAsyncServiceServer

type TextRecognitionAsyncServiceServer interface {
	// To send the image for asynchronous text recognition.
	Recognize(context.Context, *RecognizeTextRequest) (*operation.Operation, error)
	// To get recognition results.
	GetRecognition(*GetRecognitionRequest, TextRecognitionAsyncService_GetRecognitionServer) error
}

TextRecognitionAsyncServiceServer is the server API for TextRecognitionAsyncService service. All implementations should embed UnimplementedTextRecognitionAsyncServiceServer for forward compatibility

type TextRecognitionAsyncService_GetRecognitionClient

type TextRecognitionAsyncService_GetRecognitionClient interface {
	Recv() (*RecognizeTextResponse, error)
	grpc.ClientStream
}

type TextRecognitionAsyncService_GetRecognitionServer

type TextRecognitionAsyncService_GetRecognitionServer interface {
	Send(*RecognizeTextResponse) error
	grpc.ServerStream
}

type TextRecognitionServiceClient

type TextRecognitionServiceClient interface {
	// To send the image for text recognition.
	Recognize(ctx context.Context, in *RecognizeTextRequest, opts ...grpc.CallOption) (TextRecognitionService_RecognizeClient, error)
}

TextRecognitionServiceClient is the client API for TextRecognitionService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type TextRecognitionServiceServer

type TextRecognitionServiceServer interface {
	// To send the image for text recognition.
	Recognize(*RecognizeTextRequest, TextRecognitionService_RecognizeServer) error
}

TextRecognitionServiceServer is the server API for TextRecognitionService service. All implementations should embed UnimplementedTextRecognitionServiceServer for forward compatibility

type TextRecognitionService_RecognizeClient

type TextRecognitionService_RecognizeClient interface {
	Recv() (*RecognizeTextResponse, error)
	grpc.ClientStream
}

type TextRecognitionService_RecognizeServer

type TextRecognitionService_RecognizeServer interface {
	Send(*RecognizeTextResponse) error
	grpc.ServerStream
}

type TextSegments

type TextSegments struct {

	// Start character position from full_text string.
	StartIndex int64 `protobuf:"varint,1,opt,name=start_index,json=startIndex,proto3" json:"start_index,omitempty"`
	// Text segment length.
	Length int64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"`
	// contains filtered or unexported fields
}

func (*TextSegments) Descriptor deprecated

func (*TextSegments) Descriptor() ([]byte, []int)

Deprecated: Use TextSegments.ProtoReflect.Descriptor instead.

func (*TextSegments) GetLength

func (x *TextSegments) GetLength() int64

func (*TextSegments) GetStartIndex

func (x *TextSegments) GetStartIndex() int64

func (*TextSegments) ProtoMessage

func (*TextSegments) ProtoMessage()

func (*TextSegments) ProtoReflect

func (x *TextSegments) ProtoReflect() protoreflect.Message

func (*TextSegments) Reset

func (x *TextSegments) Reset()

func (*TextSegments) SetLength

func (m *TextSegments) SetLength(v int64)

func (*TextSegments) SetStartIndex

func (m *TextSegments) SetStartIndex(v int64)

func (*TextSegments) String

func (x *TextSegments) String() string

type UnimplementedTextRecognitionAsyncServiceServer

type UnimplementedTextRecognitionAsyncServiceServer struct {
}

UnimplementedTextRecognitionAsyncServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedTextRecognitionAsyncServiceServer) Recognize

type UnimplementedTextRecognitionServiceServer

type UnimplementedTextRecognitionServiceServer struct {
}

UnimplementedTextRecognitionServiceServer should be embedded to have forward compatible implementations.

type UnsafeTextRecognitionAsyncServiceServer

type UnsafeTextRecognitionAsyncServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeTextRecognitionAsyncServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TextRecognitionAsyncServiceServer will result in compilation errors.

type UnsafeTextRecognitionServiceServer

type UnsafeTextRecognitionServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeTextRecognitionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TextRecognitionServiceServer will result in compilation errors.

type Vertex

type Vertex struct {

	// X coordinate in pixels.
	X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	// Y coordinate in pixels.
	Y int64 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	// contains filtered or unexported fields
}

func (*Vertex) Descriptor deprecated

func (*Vertex) Descriptor() ([]byte, []int)

Deprecated: Use Vertex.ProtoReflect.Descriptor instead.

func (*Vertex) GetX

func (x *Vertex) GetX() int64

func (*Vertex) GetY

func (x *Vertex) GetY() int64

func (*Vertex) ProtoMessage

func (*Vertex) ProtoMessage()

func (*Vertex) ProtoReflect

func (x *Vertex) ProtoReflect() protoreflect.Message

func (*Vertex) Reset

func (x *Vertex) Reset()

func (*Vertex) SetX

func (m *Vertex) SetX(v int64)

func (*Vertex) SetY

func (m *Vertex) SetY(v int64)

func (*Vertex) String

func (x *Vertex) String() string

type Word

type Word struct {

	// Area on the page where the word is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Recognized word value.
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// ID of the recognized word in entities array.
	EntityIndex int64 `protobuf:"varint,3,opt,name=entity_index,json=entityIndex,proto3" json:"entity_index,omitempty"`
	// Word position from full_text string.
	TextSegments []*TextSegments `protobuf:"bytes,4,rep,name=text_segments,json=textSegments,proto3" json:"text_segments,omitempty"`
	// contains filtered or unexported fields
}

func (*Word) Descriptor deprecated

func (*Word) Descriptor() ([]byte, []int)

Deprecated: Use Word.ProtoReflect.Descriptor instead.

func (*Word) GetBoundingBox

func (x *Word) GetBoundingBox() *Polygon

func (*Word) GetEntityIndex

func (x *Word) GetEntityIndex() int64

func (*Word) GetText

func (x *Word) GetText() string

func (*Word) GetTextSegments

func (x *Word) GetTextSegments() []*TextSegments

func (*Word) ProtoMessage

func (*Word) ProtoMessage()

func (*Word) ProtoReflect

func (x *Word) ProtoReflect() protoreflect.Message

func (*Word) Reset

func (x *Word) Reset()

func (*Word) SetBoundingBox

func (m *Word) SetBoundingBox(v *Polygon)

func (*Word) SetEntityIndex

func (m *Word) SetEntityIndex(v int64)

func (*Word) SetText

func (m *Word) SetText(v string)

func (*Word) SetTextSegments

func (m *Word) SetTextSegments(v []*TextSegments)

func (*Word) String

func (x *Word) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL