v20181106

package
v3.0.233+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "2018-11-06"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) Evaluation

func (c *Client) Evaluation(request *EvaluationRequest) (response *EvaluationResponse, err error)

速算题目批改接口,根据用户上传的图片或图片的URL识别图片中的数学算式,进而给出算式的正确性评估。

type EvaluationRequest

type EvaluationRequest struct {
	*tchttp.BaseRequest

	// 图片唯一标识,一张图片一个SessionId;
	SessionId *string `json:"SessionId,omitempty" name:"SessionId"`

	// 图片数据,需要使用base64对图片的二进制数据进行编码,与url参数二者填一即可;
	Image *string `json:"Image,omitempty" name:"Image"`

	// 业务应用ID,与账号应用APPID无关,是用来方便客户管理服务的参数,新的 HcmAppid 可以在[控制台](https://console.cloud.tencent.com/hcm)【应用管理】下新建。
	HcmAppid *string `json:"HcmAppid,omitempty" name:"HcmAppid"`

	// 图片url,与Image参数二者填一即可;
	Url *string `json:"Url,omitempty" name:"Url"`

	// 横屏拍摄开关,若开启则支持传输横屏拍摄的图片;
	SupportHorizontalImage *bool `json:"SupportHorizontalImage,omitempty" name:"SupportHorizontalImage"`

	// 拒绝非速算图(如风景图、人物图)开关,若开启,则遇到非速算图会快速返回拒绝的结果,但极端情况下可能会影响评估结果(比如算式截图贴到风景画里可能被判为非速算图直接返回了)。
	RejectNonArithmeticImage *bool `json:"RejectNonArithmeticImage,omitempty" name:"RejectNonArithmeticImage"`

	// 异步模式标识,0:同步模式,1:异步模式。默认为同步模式
	IsAsync *int64 `json:"IsAsync,omitempty" name:"IsAsync"`

	// 是否展开耦合算式中的竖式计算
	EnableDispRelatedVertical *bool `json:"EnableDispRelatedVertical,omitempty" name:"EnableDispRelatedVertical"`

	// 是否展示竖式算式的中间结果和格式控制字符
	EnableDispMidresult *bool `json:"EnableDispMidresult,omitempty" name:"EnableDispMidresult"`

	// 是否开启pdf识别,默认开启
	EnablePdfRecognize *bool `json:"EnablePdfRecognize,omitempty" name:"EnablePdfRecognize"`

	// pdf页码,从0开始,默认为0
	PdfPageIndex *int64 `json:"PdfPageIndex,omitempty" name:"PdfPageIndex"`

	// 是否返回LaTex,默认为0返回普通格式,设置成1返回LaTex格式
	LaTex *int64 `json:"LaTex,omitempty" name:"LaTex"`
}

func NewEvaluationRequest

func NewEvaluationRequest() (request *EvaluationRequest)

func (*EvaluationRequest) FromJsonString

func (r *EvaluationRequest) FromJsonString(s string) error

func (*EvaluationRequest) ToJsonString

func (r *EvaluationRequest) ToJsonString() string

type EvaluationResponse

type EvaluationResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 图片唯一标识,一张图片一个SessionId;
		SessionId *string `json:"SessionId,omitempty" name:"SessionId"`

		// 识别出的算式信息;
		// 注意:此字段可能返回 null,表示取不到有效值。
		Items []*Item `json:"Items,omitempty" name:"Items" list`

		// 任务 id,用于查询接口
		TaskId *string `json:"TaskId,omitempty" name:"TaskId"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewEvaluationResponse

func NewEvaluationResponse() (response *EvaluationResponse)

func (*EvaluationResponse) FromJsonString

func (r *EvaluationResponse) FromJsonString(s string) error

func (*EvaluationResponse) ToJsonString

func (r *EvaluationResponse) ToJsonString() string

type Item

type Item struct {

	// 识别的算式是否正确
	Item *string `json:"Item,omitempty" name:"Item"`

	// 识别的算式
	ItemString *string `json:"ItemString,omitempty" name:"ItemString"`

	// 识别的算式在图片上的位置信息
	ItemCoord *ItemCoord `json:"ItemCoord,omitempty" name:"ItemCoord"`

	// 推荐的答案,暂不支持多个关系运算符、无关系运算符、单位换算错题的推荐答案返回。
	Answer *string `json:"Answer,omitempty" name:"Answer"`

	// 算式题型编号,如加减乘除四则题型,具体题型及编号如下:1 加减乘除四则 2 加减乘除已知结果求运算因子3 判断大小 4 约等于估算 5 带余数除法 6 分数四则运算 7 单位换算 8 竖式加减法 9 竖式乘除法 10 脱式计算 11 解方程
	// 注意:此字段可能返回 null,表示取不到有效值。
	ExpressionType *string `json:"ExpressionType,omitempty" name:"ExpressionType"`

	// 文本行置信度
	// 注意:此字段可能返回 null,表示取不到有效值。
	ItemConf *float64 `json:"ItemConf,omitempty" name:"ItemConf"`
}

type ItemCoord

type ItemCoord struct {

	// 算式高度
	Height *int64 `json:"Height,omitempty" name:"Height"`

	// 算式宽度
	Width *int64 `json:"Width,omitempty" name:"Width"`

	// 算式图的左上角横坐标
	X *int64 `json:"X,omitempty" name:"X"`

	// 算式图的左上角纵坐标
	Y *int64 `json:"Y,omitempty" name:"Y"`
}

Jump to

Keyboard shortcuts

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