formrecognizer

package
v59.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package formrecognizer implements the Azure ARM Formrecognizer service API version 1.0-preview.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type AnalyzeResult

type AnalyzeResult struct {
	autorest.Response `json:"-"`
	// Status - Status of the analyze operation. Possible values include: 'Status2Success', 'Status2PartialSuccess', 'Status2Failure'
	Status Status2 `json:"status,omitempty"`
	// Pages - Page level information extracted in the analyzed
	// document.
	Pages *[]ExtractedPage `json:"pages,omitempty"`
	// Errors - List of errors reported during the analyze
	// operation.
	Errors *[]FormOperationError `json:"errors,omitempty"`
}

AnalyzeResult analyze API call result.

type BaseClient

type BaseClient struct {
	autorest.Client
	Endpoint string
}

BaseClient is the base client for Formrecognizer.

func New

func New(endpoint string) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults(endpoint string) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

func (BaseClient) AnalyzeWithCustomModel

func (client BaseClient) AnalyzeWithCustomModel(ctx context.Context, ID uuid.UUID, formStream io.ReadCloser, keys []string) (result AnalyzeResult, err error)

AnalyzeWithCustomModel extract key-value pairs from a given document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg' or 'image/png'. A success response is returned in JSON. Parameters: ID - model Identifier to analyze the document with. formStream - a pdf document or image (jpg,png) file to analyze. keys - an optional list of known keys to extract the values for.

func (BaseClient) AnalyzeWithCustomModelPreparer

func (client BaseClient) AnalyzeWithCustomModelPreparer(ctx context.Context, ID uuid.UUID, formStream io.ReadCloser, keys []string) (*http.Request, error)

AnalyzeWithCustomModelPreparer prepares the AnalyzeWithCustomModel request.

func (BaseClient) AnalyzeWithCustomModelResponder

func (client BaseClient) AnalyzeWithCustomModelResponder(resp *http.Response) (result AnalyzeResult, err error)

AnalyzeWithCustomModelResponder handles the response to the AnalyzeWithCustomModel request. The method always closes the http.Response Body.

func (BaseClient) AnalyzeWithCustomModelSender

func (client BaseClient) AnalyzeWithCustomModelSender(req *http.Request) (*http.Response, error)

AnalyzeWithCustomModelSender sends the AnalyzeWithCustomModel request. The method will close the http.Response Body if it receives an error.

func (BaseClient) BatchReadReceipt

func (client BaseClient) BatchReadReceipt(ctx context.Context, imageURL ImageURL) (result autorest.Response, err error)

BatchReadReceipt batch Read Receipt operation. The response contains a field called 'Operation-Location', which contains the URL that you must use for your 'Get Read Receipt Result' operation. Parameters: imageURL - a JSON document with a URL pointing to the image that is to be analyzed.

func (BaseClient) BatchReadReceiptInStream

func (client BaseClient) BatchReadReceiptInStream(ctx context.Context, imageParameter io.ReadCloser) (result autorest.Response, err error)

BatchReadReceiptInStream read Receipt operation. When you use the 'Batch Read Receipt' interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'Get Read Receipt Result' operation. Parameters: imageParameter - an image stream.

func (BaseClient) BatchReadReceiptInStreamPreparer

func (client BaseClient) BatchReadReceiptInStreamPreparer(ctx context.Context, imageParameter io.ReadCloser) (*http.Request, error)

BatchReadReceiptInStreamPreparer prepares the BatchReadReceiptInStream request.

func (BaseClient) BatchReadReceiptInStreamResponder

func (client BaseClient) BatchReadReceiptInStreamResponder(resp *http.Response) (result autorest.Response, err error)

BatchReadReceiptInStreamResponder handles the response to the BatchReadReceiptInStream request. The method always closes the http.Response Body.

func (BaseClient) BatchReadReceiptInStreamSender

func (client BaseClient) BatchReadReceiptInStreamSender(req *http.Request) (*http.Response, error)

BatchReadReceiptInStreamSender sends the BatchReadReceiptInStream request. The method will close the http.Response Body if it receives an error.

func (BaseClient) BatchReadReceiptPreparer

func (client BaseClient) BatchReadReceiptPreparer(ctx context.Context, imageURL ImageURL) (*http.Request, error)

BatchReadReceiptPreparer prepares the BatchReadReceipt request.

func (BaseClient) BatchReadReceiptResponder

func (client BaseClient) BatchReadReceiptResponder(resp *http.Response) (result autorest.Response, err error)

BatchReadReceiptResponder handles the response to the BatchReadReceipt request. The method always closes the http.Response Body.

func (BaseClient) BatchReadReceiptSender

func (client BaseClient) BatchReadReceiptSender(req *http.Request) (*http.Response, error)

BatchReadReceiptSender sends the BatchReadReceipt request. The method will close the http.Response Body if it receives an error.

func (BaseClient) DeleteCustomModel

func (client BaseClient) DeleteCustomModel(ctx context.Context, ID uuid.UUID) (result autorest.Response, err error)

DeleteCustomModel delete model artifacts. Parameters: ID - the identifier of the model to delete.

func (BaseClient) DeleteCustomModelPreparer

func (client BaseClient) DeleteCustomModelPreparer(ctx context.Context, ID uuid.UUID) (*http.Request, error)

DeleteCustomModelPreparer prepares the DeleteCustomModel request.

func (BaseClient) DeleteCustomModelResponder

func (client BaseClient) DeleteCustomModelResponder(resp *http.Response) (result autorest.Response, err error)

DeleteCustomModelResponder handles the response to the DeleteCustomModel request. The method always closes the http.Response Body.

func (BaseClient) DeleteCustomModelSender

func (client BaseClient) DeleteCustomModelSender(req *http.Request) (*http.Response, error)

DeleteCustomModelSender sends the DeleteCustomModel request. The method will close the http.Response Body if it receives an error.

func (BaseClient) GetCustomModel

func (client BaseClient) GetCustomModel(ctx context.Context, ID uuid.UUID) (result ModelResult, err error)

GetCustomModel get information about a model. Parameters: ID - model identifier.

func (BaseClient) GetCustomModelPreparer

func (client BaseClient) GetCustomModelPreparer(ctx context.Context, ID uuid.UUID) (*http.Request, error)

GetCustomModelPreparer prepares the GetCustomModel request.

func (BaseClient) GetCustomModelResponder

func (client BaseClient) GetCustomModelResponder(resp *http.Response) (result ModelResult, err error)

GetCustomModelResponder handles the response to the GetCustomModel request. The method always closes the http.Response Body.

func (BaseClient) GetCustomModelSender

func (client BaseClient) GetCustomModelSender(req *http.Request) (*http.Response, error)

GetCustomModelSender sends the GetCustomModel request. The method will close the http.Response Body if it receives an error.

func (BaseClient) GetCustomModels

func (client BaseClient) GetCustomModels(ctx context.Context) (result ModelsResult, err error)

GetCustomModels get information about all trained custom models

func (BaseClient) GetCustomModelsPreparer

func (client BaseClient) GetCustomModelsPreparer(ctx context.Context) (*http.Request, error)

GetCustomModelsPreparer prepares the GetCustomModels request.

func (BaseClient) GetCustomModelsResponder

func (client BaseClient) GetCustomModelsResponder(resp *http.Response) (result ModelsResult, err error)

GetCustomModelsResponder handles the response to the GetCustomModels request. The method always closes the http.Response Body.

func (BaseClient) GetCustomModelsSender

func (client BaseClient) GetCustomModelsSender(req *http.Request) (*http.Response, error)

GetCustomModelsSender sends the GetCustomModels request. The method will close the http.Response Body if it receives an error.

func (BaseClient) GetExtractedKeys

func (client BaseClient) GetExtractedKeys(ctx context.Context, ID uuid.UUID) (result KeysResult, err error)

GetExtractedKeys retrieve the keys that were extracted during the training of the specified model. Parameters: ID - model identifier.

func (BaseClient) GetExtractedKeysPreparer

func (client BaseClient) GetExtractedKeysPreparer(ctx context.Context, ID uuid.UUID) (*http.Request, error)

GetExtractedKeysPreparer prepares the GetExtractedKeys request.

func (BaseClient) GetExtractedKeysResponder

func (client BaseClient) GetExtractedKeysResponder(resp *http.Response) (result KeysResult, err error)

GetExtractedKeysResponder handles the response to the GetExtractedKeys request. The method always closes the http.Response Body.

func (BaseClient) GetExtractedKeysSender

func (client BaseClient) GetExtractedKeysSender(req *http.Request) (*http.Response, error)

GetExtractedKeysSender sends the GetExtractedKeys request. The method will close the http.Response Body if it receives an error.

func (BaseClient) GetReadReceiptResult

func (client BaseClient) GetReadReceiptResult(ctx context.Context, operationID string) (result ReadReceiptResult, err error)

GetReadReceiptResult this interface is used for getting the analysis results of a 'Batch Read Receipt' operation. The URL to this interface should be retrieved from the 'Operation-Location' field returned from the 'Batch Read Receipt' operation. Parameters: operationID - id of read operation returned in the response of a 'Batch Read Receipt' operation.

func (BaseClient) GetReadReceiptResultPreparer

func (client BaseClient) GetReadReceiptResultPreparer(ctx context.Context, operationID string) (*http.Request, error)

GetReadReceiptResultPreparer prepares the GetReadReceiptResult request.

func (BaseClient) GetReadReceiptResultResponder

func (client BaseClient) GetReadReceiptResultResponder(resp *http.Response) (result ReadReceiptResult, err error)

GetReadReceiptResultResponder handles the response to the GetReadReceiptResult request. The method always closes the http.Response Body.

func (BaseClient) GetReadReceiptResultSender

func (client BaseClient) GetReadReceiptResultSender(req *http.Request) (*http.Response, error)

GetReadReceiptResultSender sends the GetReadReceiptResult request. The method will close the http.Response Body if it receives an error.

func (BaseClient) TrainCustomModel

func (client BaseClient) TrainCustomModel(ctx context.Context, trainRequest TrainRequest) (result TrainResult, err error)

TrainCustomModel create and train a custom model. The train request must include a source parameter that is either an externally accessible Azure Storage blob container Uri (preferably a Shared Access Signature Uri) or valid path to a data folder in a locally mounted drive. When local paths are specified, they must follow the Linux/Unix path format and be an absolute path rooted to the input mount configuration setting value e.g., if '{Mounts:Input}' configuration setting value is '/input' then a valid source path would be '/input/contosodataset'. All data to be trained is expected to be directly under the source folder. Subfolders are not supported. Models are trained using documents that are of the following content type - 'application/pdf', 'image/jpeg' and 'image/png'." Other type of content is ignored. Parameters: trainRequest - request object for training.

func (BaseClient) TrainCustomModelPreparer

func (client BaseClient) TrainCustomModelPreparer(ctx context.Context, trainRequest TrainRequest) (*http.Request, error)

TrainCustomModelPreparer prepares the TrainCustomModel request.

func (BaseClient) TrainCustomModelResponder

func (client BaseClient) TrainCustomModelResponder(resp *http.Response) (result TrainResult, err error)

TrainCustomModelResponder handles the response to the TrainCustomModel request. The method always closes the http.Response Body.

func (BaseClient) TrainCustomModelSender

func (client BaseClient) TrainCustomModelSender(req *http.Request) (*http.Response, error)

TrainCustomModelSender sends the TrainCustomModel request. The method will close the http.Response Body if it receives an error.

type BasicFieldValue

type BasicFieldValue interface {
	AsStringValue() (*StringValue, bool)
	AsNumberValue() (*NumberValue, bool)
	AsFieldValue() (*FieldValue, bool)
}

BasicFieldValue base class representing a recognized field value.

type ComputerVisionError

type ComputerVisionError struct {
	// Code - The error code.
	Code interface{} `json:"code,omitempty"`
	// Message - A message explaining the error reported by the service.
	Message *string `json:"message,omitempty"`
	// RequestID - A unique request identifier.
	RequestID *string `json:"requestId,omitempty"`
}

ComputerVisionError details about the API request error.

type ElementReference

type ElementReference struct {
	Ref *string `json:"$ref,omitempty"`
}

ElementReference reference to an OCR word.

type ErrorInformation

type ErrorInformation struct {
	Code       *string     `json:"code,omitempty"`
	InnerError *InnerError `json:"innerError,omitempty"`
	Message    *string     `json:"message,omitempty"`
}

ErrorInformation ...

type ErrorResponse

type ErrorResponse struct {
	Error *ErrorInformation `json:"error,omitempty"`
}

ErrorResponse ...

type ExtractedKeyValuePair

type ExtractedKeyValuePair struct {
	// Key - List of tokens for the extracted key in a key-value pair.
	Key *[]ExtractedToken `json:"key,omitempty"`
	// Value - List of tokens for the extracted value in a key-value pair.
	Value *[]ExtractedToken `json:"value,omitempty"`
}

ExtractedKeyValuePair representation of a key-value pair as a list of key and value tokens.

type ExtractedPage

type ExtractedPage struct {
	// Number - Page number.
	Number *int32 `json:"number,omitempty"`
	// Height - Height of the page (in pixels).
	Height *int32 `json:"height,omitempty"`
	// Width - Width of the page (in pixels).
	Width *int32 `json:"width,omitempty"`
	// ClusterID - Cluster identifier.
	ClusterID *int32 `json:"clusterId,omitempty"`
	// KeyValuePairs - List of Key-Value pairs extracted from the page.
	KeyValuePairs *[]ExtractedKeyValuePair `json:"keyValuePairs,omitempty"`
	// Tables - List of Tables and their information extracted from the page.
	Tables *[]ExtractedTable `json:"tables,omitempty"`
}

ExtractedPage extraction information of a single page in a with a document.

type ExtractedTable

type ExtractedTable struct {
	// ID - Table identifier.
	ID *string `json:"id,omitempty"`
	// Columns - List of columns contained in the table.
	Columns *[]ExtractedTableColumn `json:"columns,omitempty"`
}

ExtractedTable extraction information about a table contained in a page.

type ExtractedTableColumn

type ExtractedTableColumn struct {
	// Header - List of extracted tokens for the column header.
	Header *[]ExtractedToken `json:"header,omitempty"`
	// Entries - Extracted text for each cell of a column. Each cell
	// in the column can have a list of one or more tokens.
	Entries *[][]ExtractedToken `json:"entries,omitempty"`
}

ExtractedTableColumn extraction information of a column in a table.

type ExtractedToken

type ExtractedToken struct {
	// Text - String value of the extracted text.
	Text *string `json:"text,omitempty"`
	// BoundingBox - Bounding box of the extracted text. Represents the
	// location of the extracted text as a pair of
	// cartesian co-ordinates. The co-ordinate pairs are arranged by
	// top-left, top-right, bottom-right and bottom-left endpoints box
	// with origin reference from the bottom-left of the page.
	BoundingBox *[]float64 `json:"boundingBox,omitempty"`
	// Confidence - A measure of accuracy of the extracted text.
	Confidence *float64 `json:"confidence,omitempty"`
}

ExtractedToken canonical representation of single extracted text.

type FieldValue

type FieldValue struct {
	// Text - OCR text content of the recognized field.
	Text *string `json:"text,omitempty"`
	// Elements - List of references to OCR words comprising the recognized field value.
	Elements *[]ElementReference `json:"elements,omitempty"`
	// ValueType - Possible values include: 'ValueTypeFieldValue', 'ValueTypeStringValue', 'ValueTypeNumberValue'
	ValueType ValueType `json:"valueType,omitempty"`
}

FieldValue base class representing a recognized field value.

func (FieldValue) AsBasicFieldValue

func (fv FieldValue) AsBasicFieldValue() (BasicFieldValue, bool)

AsBasicFieldValue is the BasicFieldValue implementation for FieldValue.

func (FieldValue) AsFieldValue

func (fv FieldValue) AsFieldValue() (*FieldValue, bool)

AsFieldValue is the BasicFieldValue implementation for FieldValue.

func (FieldValue) AsNumberValue

func (fv FieldValue) AsNumberValue() (*NumberValue, bool)

AsNumberValue is the BasicFieldValue implementation for FieldValue.

func (FieldValue) AsStringValue

func (fv FieldValue) AsStringValue() (*StringValue, bool)

AsStringValue is the BasicFieldValue implementation for FieldValue.

func (FieldValue) MarshalJSON

func (fv FieldValue) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for FieldValue.

type FormDocumentReport

type FormDocumentReport struct {
	// DocumentName - Reference to the data that the report is for.
	DocumentName *string `json:"documentName,omitempty"`
	// Pages - Total number of pages trained on.
	Pages *int32 `json:"pages,omitempty"`
	// Errors - List of errors per page.
	Errors *[]string `json:"errors,omitempty"`
	// Status - Status of the training operation. Possible values include: 'Success', 'PartialSuccess', 'Failure'
	Status Status `json:"status,omitempty"`
}

FormDocumentReport ...

type FormOperationError

type FormOperationError struct {
	// ErrorMessage - Message reported during the train operation.
	ErrorMessage *string `json:"errorMessage,omitempty"`
}

FormOperationError error reported during an operation.

type ImageURL

type ImageURL struct {
	// URL - Publicly reachable URL of an image.
	URL *string `json:"url,omitempty"`
}

ImageURL ...

type InnerError

type InnerError struct {
	RequestID *string `json:"requestId,omitempty"`
}

InnerError ...

type KeysResult

type KeysResult struct {
	autorest.Response `json:"-"`
	// Clusters - Object mapping ClusterIds to Key lists.
	Clusters map[string][]string `json:"clusters"`
}

KeysResult result of an operation to get the keys extracted by a model.

func (KeysResult) MarshalJSON

func (kr KeysResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for KeysResult.

type Line

type Line struct {
	// BoundingBox - Bounding box of a recognized line.
	BoundingBox *[]int32 `json:"boundingBox,omitempty"`
	// Text - The text content of the line.
	Text *string `json:"text,omitempty"`
	// Words - List of words in the text line.
	Words *[]Word `json:"words,omitempty"`
}

Line an object representing a recognized text line.

type ModelResult

type ModelResult struct {
	autorest.Response `json:"-"`
	// ModelID - Get or set model identifier.
	ModelID *uuid.UUID `json:"modelId,omitempty"`
	// Status - Get or set the status of model. Possible values include: 'Created', 'Ready', 'Invalid'
	Status Status1 `json:"status,omitempty"`
	// CreatedDateTime - Get or set the created date time of the model.
	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
	// LastUpdatedDateTime - Get or set the model last updated datetime.
	LastUpdatedDateTime *date.Time `json:"lastUpdatedDateTime,omitempty"`
}

ModelResult result of a model status query operation.

type ModelsResult

type ModelsResult struct {
	autorest.Response `json:"-"`
	// ModelsProperty - Collection of models.
	ModelsProperty *[]ModelResult `json:"models,omitempty"`
}

ModelsResult result of query operation to fetch multiple models.

type NumberValue

type NumberValue struct {
	// Value - Numeric value of the recognized field.
	Value *float64 `json:"value,omitempty"`
	// Text - OCR text content of the recognized field.
	Text *string `json:"text,omitempty"`
	// Elements - List of references to OCR words comprising the recognized field value.
	Elements *[]ElementReference `json:"elements,omitempty"`
	// ValueType - Possible values include: 'ValueTypeFieldValue', 'ValueTypeStringValue', 'ValueTypeNumberValue'
	ValueType ValueType `json:"valueType,omitempty"`
}

NumberValue recognized numeric field value.

func (NumberValue) AsBasicFieldValue

func (nv NumberValue) AsBasicFieldValue() (BasicFieldValue, bool)

AsBasicFieldValue is the BasicFieldValue implementation for NumberValue.

func (NumberValue) AsFieldValue

func (nv NumberValue) AsFieldValue() (*FieldValue, bool)

AsFieldValue is the BasicFieldValue implementation for NumberValue.

func (NumberValue) AsNumberValue

func (nv NumberValue) AsNumberValue() (*NumberValue, bool)

AsNumberValue is the BasicFieldValue implementation for NumberValue.

func (NumberValue) AsStringValue

func (nv NumberValue) AsStringValue() (*StringValue, bool)

AsStringValue is the BasicFieldValue implementation for NumberValue.

func (NumberValue) MarshalJSON

func (nv NumberValue) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for NumberValue.

type ReadReceiptResult

type ReadReceiptResult struct {
	autorest.Response `json:"-"`
	// Status - Status of the read operation. Possible values include: 'NotStarted', 'Running', 'Failed', 'Succeeded'
	Status TextOperationStatusCodes `json:"status,omitempty"`
	// RecognitionResults - Text recognition result of the 'Batch Read Receipt' operation.
	RecognitionResults *[]TextRecognitionResult `json:"recognitionResults,omitempty"`
	// UnderstandingResults - Semantic understanding result of the 'Batch Read Receipt' operation.
	UnderstandingResults *[]UnderstandingResult `json:"understandingResults,omitempty"`
}

ReadReceiptResult analysis result of the 'Batch Read Receipt' operation.

type Status

type Status string

Status enumerates the values for status.

const (
	// Failure ...
	Failure Status = "failure"
	// PartialSuccess ...
	PartialSuccess Status = "partialSuccess"
	// Success ...
	Success Status = "success"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns an array of possible values for the Status const type.

type Status1

type Status1 string

Status1 enumerates the values for status 1.

const (
	// Created ...
	Created Status1 = "created"
	// Invalid ...
	Invalid Status1 = "invalid"
	// Ready ...
	Ready Status1 = "ready"
)

func PossibleStatus1Values

func PossibleStatus1Values() []Status1

PossibleStatus1Values returns an array of possible values for the Status1 const type.

type Status2

type Status2 string

Status2 enumerates the values for status 2.

const (
	// Status2Failure ...
	Status2Failure Status2 = "failure"
	// Status2PartialSuccess ...
	Status2PartialSuccess Status2 = "partialSuccess"
	// Status2Success ...
	Status2Success Status2 = "success"
)

func PossibleStatus2Values

func PossibleStatus2Values() []Status2

PossibleStatus2Values returns an array of possible values for the Status2 const type.

type StringValue

type StringValue struct {
	// Value - String value of the recognized field.
	Value *string `json:"value,omitempty"`
	// Text - OCR text content of the recognized field.
	Text *string `json:"text,omitempty"`
	// Elements - List of references to OCR words comprising the recognized field value.
	Elements *[]ElementReference `json:"elements,omitempty"`
	// ValueType - Possible values include: 'ValueTypeFieldValue', 'ValueTypeStringValue', 'ValueTypeNumberValue'
	ValueType ValueType `json:"valueType,omitempty"`
}

StringValue recognized string field value.

func (StringValue) AsBasicFieldValue

func (sv StringValue) AsBasicFieldValue() (BasicFieldValue, bool)

AsBasicFieldValue is the BasicFieldValue implementation for StringValue.

func (StringValue) AsFieldValue

func (sv StringValue) AsFieldValue() (*FieldValue, bool)

AsFieldValue is the BasicFieldValue implementation for StringValue.

func (StringValue) AsNumberValue

func (sv StringValue) AsNumberValue() (*NumberValue, bool)

AsNumberValue is the BasicFieldValue implementation for StringValue.

func (StringValue) AsStringValue

func (sv StringValue) AsStringValue() (*StringValue, bool)

AsStringValue is the BasicFieldValue implementation for StringValue.

func (StringValue) MarshalJSON

func (sv StringValue) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for StringValue.

type TextOperationStatusCodes

type TextOperationStatusCodes string

TextOperationStatusCodes enumerates the values for text operation status codes.

const (
	// Failed ...
	Failed TextOperationStatusCodes = "Failed"
	// NotStarted ...
	NotStarted TextOperationStatusCodes = "Not Started"
	// Running ...
	Running TextOperationStatusCodes = "Running"
	// Succeeded ...
	Succeeded TextOperationStatusCodes = "Succeeded"
)

func PossibleTextOperationStatusCodesValues

func PossibleTextOperationStatusCodesValues() []TextOperationStatusCodes

PossibleTextOperationStatusCodesValues returns an array of possible values for the TextOperationStatusCodes const type.

type TextRecognitionResult

type TextRecognitionResult struct {
	// Page - The 1-based page number of the recognition result.
	Page *int32 `json:"page,omitempty"`
	// ClockwiseOrientation - The orientation of the image in degrees in the clockwise direction. Range between [0, 360).
	ClockwiseOrientation *float64 `json:"clockwiseOrientation,omitempty"`
	// Width - The width of the image in pixels or the PDF in inches.
	Width *float64 `json:"width,omitempty"`
	// Height - The height of the image in pixels or the PDF in inches.
	Height *float64 `json:"height,omitempty"`
	// Unit - The unit used in the Width, Height and BoundingBox. For images, the unit is 'pixel'. For PDF, the unit is 'inch'. Possible values include: 'Pixel', 'Inch'
	Unit TextRecognitionResultDimensionUnit `json:"unit,omitempty"`
	// Lines - A list of recognized text lines.
	Lines *[]Line `json:"lines,omitempty"`
}

TextRecognitionResult an object representing a recognized text region

type TextRecognitionResultConfidenceClass

type TextRecognitionResultConfidenceClass string

TextRecognitionResultConfidenceClass enumerates the values for text recognition result confidence class.

const (
	// High ...
	High TextRecognitionResultConfidenceClass = "High"
	// Low ...
	Low TextRecognitionResultConfidenceClass = "Low"
)

func PossibleTextRecognitionResultConfidenceClassValues

func PossibleTextRecognitionResultConfidenceClassValues() []TextRecognitionResultConfidenceClass

PossibleTextRecognitionResultConfidenceClassValues returns an array of possible values for the TextRecognitionResultConfidenceClass const type.

type TextRecognitionResultDimensionUnit

type TextRecognitionResultDimensionUnit string

TextRecognitionResultDimensionUnit enumerates the values for text recognition result dimension unit.

const (
	// Inch ...
	Inch TextRecognitionResultDimensionUnit = "inch"
	// Pixel ...
	Pixel TextRecognitionResultDimensionUnit = "pixel"
)

func PossibleTextRecognitionResultDimensionUnitValues

func PossibleTextRecognitionResultDimensionUnitValues() []TextRecognitionResultDimensionUnit

PossibleTextRecognitionResultDimensionUnitValues returns an array of possible values for the TextRecognitionResultDimensionUnit const type.

type TrainRequest

type TrainRequest struct {
	// Source - Get or set source path.
	Source *string `json:"source,omitempty"`
	// SourceFilter - Get or set filter to further search the
	// source path for content.
	SourceFilter *TrainSourceFilter `json:"sourceFilter,omitempty"`
}

TrainRequest contract to initiate a train request.

type TrainResult

type TrainResult struct {
	autorest.Response `json:"-"`
	// ModelID - Identifier of the model.
	ModelID *uuid.UUID `json:"modelId,omitempty"`
	// TrainingDocuments - List of documents used to train the model and the
	// train operation error reported by each.
	TrainingDocuments *[]FormDocumentReport `json:"trainingDocuments,omitempty"`
	// Errors - Errors returned during the training operation.
	Errors *[]FormOperationError `json:"errors,omitempty"`
}

TrainResult response of the Train API call.

type TrainSourceFilter

type TrainSourceFilter struct {
	// Prefix - A case-sensitive prefix string to filter content
	// under the source location. For e.g., when using a Azure Blob
	// Uri use the prefix to restrict subfolders for content.
	Prefix *string `json:"prefix,omitempty"`
	// IncludeSubFolders - A flag to indicate if sub folders within the set of
	// prefix folders will also need to be included when searching
	// for content to be preprocessed.
	IncludeSubFolders *bool `json:"includeSubFolders,omitempty"`
}

TrainSourceFilter filters to be applied when traversing a data source.

type UnderstandingResult

type UnderstandingResult struct {
	// Pages - List of pages where the document is found.
	Pages *[]int32 `json:"pages,omitempty"`
	// Fields - Dictionary of recognized field values.
	Fields map[string]BasicFieldValue `json:"fields"`
}

UnderstandingResult a set of extracted fields corresponding to a semantic object, such as a receipt, in the input document.

func (UnderstandingResult) MarshalJSON

func (ur UnderstandingResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for UnderstandingResult.

type ValueType

type ValueType string

ValueType enumerates the values for value type.

const (
	// ValueTypeFieldValue ...
	ValueTypeFieldValue ValueType = "fieldValue"
	// ValueTypeNumberValue ...
	ValueTypeNumberValue ValueType = "numberValue"
	// ValueTypeStringValue ...
	ValueTypeStringValue ValueType = "stringValue"
)

func PossibleValueTypeValues

func PossibleValueTypeValues() []ValueType

PossibleValueTypeValues returns an array of possible values for the ValueType const type.

type Word

type Word struct {
	// BoundingBox - Bounding box of a recognized word.
	BoundingBox *[]int32 `json:"boundingBox,omitempty"`
	// Text - The text content of the word.
	Text *string `json:"text,omitempty"`
	// Confidence - Qualitative confidence measure. Possible values include: 'High', 'Low'
	Confidence TextRecognitionResultConfidenceClass `json:"confidence,omitempty"`
}

Word an object representing a recognized word.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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