...

Package formrecognizer

import "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v1.0/formrecognizer"
Overview
Index
Subdirectories

Overview ▾

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

Index ▾

func UserAgent() string
func Version() string
type AnalyzeResult
type BaseClient
    func New(endpoint string) BaseClient
    func NewWithoutDefaults(endpoint string) BaseClient
    func (client BaseClient) AnalyzeWithCustomModel(ctx context.Context, ID uuid.UUID, formStream io.ReadCloser, keys []string) (result AnalyzeResult, err error)
    func (client BaseClient) AnalyzeWithCustomModelPreparer(ctx context.Context, ID uuid.UUID, formStream io.ReadCloser, keys []string) (*http.Request, error)
    func (client BaseClient) AnalyzeWithCustomModelResponder(resp *http.Response) (result AnalyzeResult, err error)
    func (client BaseClient) AnalyzeWithCustomModelSender(req *http.Request) (*http.Response, error)
    func (client BaseClient) BatchReadReceipt(ctx context.Context, imageURL ImageURL) (result autorest.Response, err error)
    func (client BaseClient) BatchReadReceiptInStream(ctx context.Context, imageParameter io.ReadCloser) (result autorest.Response, err error)
    func (client BaseClient) BatchReadReceiptInStreamPreparer(ctx context.Context, imageParameter io.ReadCloser) (*http.Request, error)
    func (client BaseClient) BatchReadReceiptInStreamResponder(resp *http.Response) (result autorest.Response, err error)
    func (client BaseClient) BatchReadReceiptInStreamSender(req *http.Request) (*http.Response, error)
    func (client BaseClient) BatchReadReceiptPreparer(ctx context.Context, imageURL ImageURL) (*http.Request, error)
    func (client BaseClient) BatchReadReceiptResponder(resp *http.Response) (result autorest.Response, err error)
    func (client BaseClient) BatchReadReceiptSender(req *http.Request) (*http.Response, error)
    func (client BaseClient) DeleteCustomModel(ctx context.Context, ID uuid.UUID) (result autorest.Response, err error)
    func (client BaseClient) DeleteCustomModelPreparer(ctx context.Context, ID uuid.UUID) (*http.Request, error)
    func (client BaseClient) DeleteCustomModelResponder(resp *http.Response) (result autorest.Response, err error)
    func (client BaseClient) DeleteCustomModelSender(req *http.Request) (*http.Response, error)
    func (client BaseClient) GetCustomModel(ctx context.Context, ID uuid.UUID) (result ModelResult, err error)
    func (client BaseClient) GetCustomModelPreparer(ctx context.Context, ID uuid.UUID) (*http.Request, error)
    func (client BaseClient) GetCustomModelResponder(resp *http.Response) (result ModelResult, err error)
    func (client BaseClient) GetCustomModelSender(req *http.Request) (*http.Response, error)
    func (client BaseClient) GetCustomModels(ctx context.Context) (result ModelsResult, err error)
    func (client BaseClient) GetCustomModelsPreparer(ctx context.Context) (*http.Request, error)
    func (client BaseClient) GetCustomModelsResponder(resp *http.Response) (result ModelsResult, err error)
    func (client BaseClient) GetCustomModelsSender(req *http.Request) (*http.Response, error)
    func (client BaseClient) GetExtractedKeys(ctx context.Context, ID uuid.UUID) (result KeysResult, err error)
    func (client BaseClient) GetExtractedKeysPreparer(ctx context.Context, ID uuid.UUID) (*http.Request, error)
    func (client BaseClient) GetExtractedKeysResponder(resp *http.Response) (result KeysResult, err error)
    func (client BaseClient) GetExtractedKeysSender(req *http.Request) (*http.Response, error)
    func (client BaseClient) GetReadReceiptResult(ctx context.Context, operationID string) (result ReadReceiptResult, err error)
    func (client BaseClient) GetReadReceiptResultPreparer(ctx context.Context, operationID string) (*http.Request, error)
    func (client BaseClient) GetReadReceiptResultResponder(resp *http.Response) (result ReadReceiptResult, err error)
    func (client BaseClient) GetReadReceiptResultSender(req *http.Request) (*http.Response, error)
    func (client BaseClient) TrainCustomModel(ctx context.Context, trainRequest TrainRequest) (result TrainResult, err error)
    func (client BaseClient) TrainCustomModelPreparer(ctx context.Context, trainRequest TrainRequest) (*http.Request, error)
    func (client BaseClient) TrainCustomModelResponder(resp *http.Response) (result TrainResult, err error)
    func (client BaseClient) TrainCustomModelSender(req *http.Request) (*http.Response, error)
type BasicFieldValue
type ComputerVisionError
type ElementReference
type ErrorInformation
type ErrorResponse
type ExtractedKeyValuePair
type ExtractedPage
type ExtractedTable
type ExtractedTableColumn
type ExtractedToken
type FieldValue
    func (fv FieldValue) AsBasicFieldValue() (BasicFieldValue, bool)
    func (fv FieldValue) AsFieldValue() (*FieldValue, bool)
    func (fv FieldValue) AsNumberValue() (*NumberValue, bool)
    func (fv FieldValue) AsStringValue() (*StringValue, bool)
    func (fv FieldValue) MarshalJSON() ([]byte, error)
type FormDocumentReport
type FormOperationError
type ImageURL
type InnerError
type KeysResult
    func (kr KeysResult) MarshalJSON() ([]byte, error)
type Line
type ModelResult
type ModelsResult
type NumberValue
    func (nv NumberValue) AsBasicFieldValue() (BasicFieldValue, bool)
    func (nv NumberValue) AsFieldValue() (*FieldValue, bool)
    func (nv NumberValue) AsNumberValue() (*NumberValue, bool)
    func (nv NumberValue) AsStringValue() (*StringValue, bool)
    func (nv NumberValue) MarshalJSON() ([]byte, error)
type ReadReceiptResult
type Status
    func PossibleStatusValues() []Status
type Status1
    func PossibleStatus1Values() []Status1
type Status2
    func PossibleStatus2Values() []Status2
type StringValue
    func (sv StringValue) AsBasicFieldValue() (BasicFieldValue, bool)
    func (sv StringValue) AsFieldValue() (*FieldValue, bool)
    func (sv StringValue) AsNumberValue() (*NumberValue, bool)
    func (sv StringValue) AsStringValue() (*StringValue, bool)
    func (sv StringValue) MarshalJSON() ([]byte, error)
type TextOperationStatusCodes
    func PossibleTextOperationStatusCodesValues() []TextOperationStatusCodes
type TextRecognitionResult
type TextRecognitionResultConfidenceClass
    func PossibleTextRecognitionResultConfidenceClassValues() []TextRecognitionResultConfidenceClass
type TextRecognitionResultDimensionUnit
    func PossibleTextRecognitionResultDimensionUnitValues() []TextRecognitionResultDimensionUnit
type TrainRequest
type TrainResult
type TrainSourceFilter
type UnderstandingResult
    func (ur UnderstandingResult) MarshalJSON() ([]byte, error)
type ValueType
    func PossibleValueTypeValues() []ValueType
type Word

Package files

client.go enums.go models.go version.go

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.

type AnalyzeResult

AnalyzeResult analyze API call result.

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"`
}

type BaseClient

BaseClient is the base client for Formrecognizer.

type BaseClient struct {
    autorest.Client
    Endpoint string
}

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

BasicFieldValue base class representing a recognized field value.

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

type ComputerVisionError

ComputerVisionError details about the API request error.

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"`
}

type ElementReference

ElementReference reference to an OCR word.

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

type ErrorInformation

ErrorInformation ...

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

type ErrorResponse

ErrorResponse ...

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

type ExtractedKeyValuePair

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

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"`
}

type ExtractedPage

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

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"`
}

type ExtractedTable

ExtractedTable extraction information about a table contained in a page.

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

type ExtractedTableColumn

ExtractedTableColumn extraction information of a column in a table.

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"`
}

type ExtractedToken

ExtractedToken canonical representation of single extracted text.

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"`
}

type FieldValue

FieldValue base class representing a recognized field value.

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"`
}

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

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"`
}

type FormOperationError

FormOperationError error reported during an operation.

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

type ImageURL

ImageURL ...

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

type InnerError

InnerError ...

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

type KeysResult

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

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

func (KeysResult) MarshalJSON

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

MarshalJSON is the custom marshaler for KeysResult.

type Line

Line an object representing a recognized text 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"`
}

type ModelResult

ModelResult result of a model status query operation.

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"`
}

type ModelsResult

ModelsResult result of query operation to fetch multiple models.

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

type NumberValue

NumberValue recognized numeric field value.

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"`
}

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

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

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"`
}

type Status

Status enumerates the values for status.

type Status string
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

Status1 enumerates the values for status 1.

type Status1 string
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

Status2 enumerates the values for status 2.

type Status2 string
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

StringValue recognized string field value.

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"`
}

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

TextOperationStatusCodes enumerates the values for text operation status codes.

type TextOperationStatusCodes string
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

TextRecognitionResult an object representing a recognized text region

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"`
}

type TextRecognitionResultConfidenceClass

TextRecognitionResultConfidenceClass enumerates the values for text recognition result confidence class.

type TextRecognitionResultConfidenceClass string
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

TextRecognitionResultDimensionUnit enumerates the values for text recognition result dimension unit.

type TextRecognitionResultDimensionUnit string
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

TrainRequest contract to initiate a train request.

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"`
}

type TrainResult

TrainResult response of the Train API call.

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"`
}

type TrainSourceFilter

TrainSourceFilter filters to be applied when traversing a data source.

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"`
}

type UnderstandingResult

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

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"`
}

func (UnderstandingResult) MarshalJSON

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

MarshalJSON is the custom marshaler for UnderstandingResult.

type ValueType

ValueType enumerates the values for value type.

type ValueType string
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

Word an object representing a recognized 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"`
}

Subdirectories

Name Synopsis
..
formrecognizerapi