model

package
v0.1.39 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AspectAdvanceOpinion

type AspectAdvanceOpinion struct {

	// 属性类别 手机领域:['整体','内存','外形设计','屏幕','性价比','拍照','散热','电池','人脸识别','信号','指纹识别','音质','握持手感','活动配件赠品','防水','客服','物流派送','包装'] 汽车领域:['动力','外观','内饰','空间','操控', '舒适性', '性价比','能耗']
	AspectCategory string `json:"aspect_category"`

	// 情感标签,0:负向,1:正向
	Label int32 `json:"label"`

	// 情感标签置信度
	Confidence *float32 `json:"confidence,omitempty"`

	// 属性描述词,预留参数,暂不支持。
	AspectTerm string `json:"aspect_term"`

	// 观点描述词,预留参数,暂不支持。
	OpinionTerm string `json:"opinion_term"`

	// 属性评价起始位置,预留参数,暂不支持。
	Span []int32 `json:"span"`

	// 观点标签,预留参数,暂不支持。
	Tag *string `json:"tag,omitempty"`
}

属性观点列表

func (AspectAdvanceOpinion) String

func (o AspectAdvanceOpinion) String() string

type AspectOpinion

type AspectOpinion struct {

	// 属性类别 手机领域:['整体','性价比', '赠品','分期', '配件', '活动', '品牌', '物流派送', '包装', '游戏性能', '系统性能', '芯片', '屏幕', '电池', '自拍', '拍照', '音质', '散热', '防水', '信号', '解锁', '外形设计', '握持手感', '质感', '颜色', '内存/容量', '客服/售后', '其他']
	AspectCategory string `json:"aspect_category"`

	// 属性词,与对应的描述词至少出现其中之一,可能为null。
	AspectTerm string `json:"aspect_term"`

	// 描述词,与对应的属性词至少出现其中之一,可能为null。
	OpinionTerm string `json:"opinion_term"`

	// 共4个数字,分别表示属性词和描述词在文本中的起始位置和结束位置。若属性词为null,则1, 2两位不展示;若描述词为null,则3, 4位不展示。
	Span []int32 `json:"span"`

	// 情感标签,0:负向,1:正向
	Label int32 `json:"label"`

	// 情感标签置信度
	Confidence *float32 `json:"confidence,omitempty"`

	// 属性-描述词片段所对应的标签。若分类为'其他',则不给出标签,返回null。
	Tag *string `json:"tag,omitempty"`
}

属性观点列表

func (AspectOpinion) String

func (o AspectOpinion) String() string

type AspectSentimentAdvanceRequest

type AspectSentimentAdvanceRequest struct {

	// 待分析文本。文本编码要求为utf-8,仅支持中文。 限定4096个字符以内,建议文本长度300个字符以内。
	Content string `json:"content"`

	// 取值如下: 1 手机领域 2 汽车领域
	Type AspectSentimentAdvanceRequestType `json:"type"`
}

func (AspectSentimentAdvanceRequest) String

type AspectSentimentAdvanceRequestType

type AspectSentimentAdvanceRequestType struct {
	// contains filtered or unexported fields
}

func (AspectSentimentAdvanceRequestType) MarshalJSON

func (c AspectSentimentAdvanceRequestType) MarshalJSON() ([]byte, error)

func (*AspectSentimentAdvanceRequestType) UnmarshalJSON

func (c *AspectSentimentAdvanceRequestType) UnmarshalJSON(b []byte) error

func (AspectSentimentAdvanceRequestType) Value added in v0.0.90

type AspectSentimentAdvanceRequestTypeEnum

type AspectSentimentAdvanceRequestTypeEnum struct {
	E_1 AspectSentimentAdvanceRequestType
	E_2 AspectSentimentAdvanceRequestType
}

func GetAspectSentimentAdvanceRequestTypeEnum

func GetAspectSentimentAdvanceRequestTypeEnum() AspectSentimentAdvanceRequestTypeEnum

type AspectSentimentRequest

type AspectSentimentRequest struct {

	// 待分析文本。仅支持中文,文本编码要求为utf-8。 建议文本长度1000个字符以内。
	Content string `json:"content"`

	// 取值如下: 1 手机领域
	Type AspectSentimentRequestType `json:"type"`
}

func (AspectSentimentRequest) String

func (o AspectSentimentRequest) String() string

type AspectSentimentRequestType

type AspectSentimentRequestType struct {
	// contains filtered or unexported fields
}

func (AspectSentimentRequestType) MarshalJSON

func (c AspectSentimentRequestType) MarshalJSON() ([]byte, error)

func (*AspectSentimentRequestType) UnmarshalJSON

func (c *AspectSentimentRequestType) UnmarshalJSON(b []byte) error

func (AspectSentimentRequestType) Value added in v0.0.90

type AspectSentimentRequestTypeEnum

type AspectSentimentRequestTypeEnum struct {
	E_1 AspectSentimentRequestType
}

func GetAspectSentimentRequestTypeEnum

func GetAspectSentimentRequestTypeEnum() AspectSentimentRequestTypeEnum

type ClassificationReq

type ClassificationReq struct {

	// 待分析文本。文本编码要求为utf-8。 限定400个字符以内,文本长度超过400个字符时,只检测前400个字符。
	Content string `json:"content"`

	// 1 广告检测
	Domain *ClassificationReqDomain `json:"domain,omitempty"`
}

func (ClassificationReq) String

func (o ClassificationReq) String() string

type ClassificationReqDomain

type ClassificationReqDomain struct {
	// contains filtered or unexported fields
}

func (ClassificationReqDomain) MarshalJSON

func (c ClassificationReqDomain) MarshalJSON() ([]byte, error)

func (*ClassificationReqDomain) UnmarshalJSON

func (c *ClassificationReqDomain) UnmarshalJSON(b []byte) error

func (ClassificationReqDomain) Value added in v0.0.90

func (c ClassificationReqDomain) Value() int32

type ClassificationReqDomainEnum

type ClassificationReqDomainEnum struct {
	E_1 ClassificationReqDomain
}

func GetClassificationReqDomainEnum

func GetClassificationReqDomainEnum() ClassificationReqDomainEnum

type ClassificationResult

type ClassificationResult struct {

	// 待分析文本。
	Content string `json:"content"`

	// 分类标签。 1:广告 0:非广告
	Label int32 `json:"label"`

	// 标签label的置信度。
	Confidence float32 `json:"confidence"`
}

result字段数据结构说明

func (ClassificationResult) String

func (o ClassificationResult) String() string

type ConstituencyParserReq added in v0.0.100

type ConstituencyParserReq struct {

	// 支持的文本语言类型,目前支持中文(zh)。
	Lang *ConstituencyParserReqLang `json:"lang,omitempty"`

	// 待分析文本,长度为1~32。
	Text string `json:"text"`
}

func (ConstituencyParserReq) String added in v0.0.100

func (o ConstituencyParserReq) String() string

type ConstituencyParserReqLang added in v0.0.100

type ConstituencyParserReqLang struct {
	// contains filtered or unexported fields
}

func (ConstituencyParserReqLang) MarshalJSON added in v0.0.100

func (c ConstituencyParserReqLang) MarshalJSON() ([]byte, error)

func (*ConstituencyParserReqLang) UnmarshalJSON added in v0.0.100

func (c *ConstituencyParserReqLang) UnmarshalJSON(b []byte) error

func (ConstituencyParserReqLang) Value added in v0.0.100

type ConstituencyParserReqLangEnum added in v0.0.100

type ConstituencyParserReqLangEnum struct {
	ZH ConstituencyParserReqLang
}

func GetConstituencyParserReqLangEnum added in v0.0.100

func GetConstituencyParserReqLangEnum() ConstituencyParserReqLangEnum

type CreatePoem

type CreatePoem struct {

	// 诗歌标题,目前仅支持UTF-8编码,仅支持中文,长度为1-10
	Title string `json:"title"`

	// 诗歌类型,取值如下: 0:五言绝句; 1:七言绝句; 2:五言律诗; 3:七言律诗;
	Type CreatePoemType `json:"type"`

	// 藏头诗,取值如下: 取值为true,为藏头诗; 取值为false,非藏头诗; 默认取值为false。
	Acrostic *bool `json:"acrostic,omitempty"`
}

func (CreatePoem) String

func (o CreatePoem) String() string

type CreatePoemType

type CreatePoemType struct {
	// contains filtered or unexported fields
}

func (CreatePoemType) MarshalJSON

func (c CreatePoemType) MarshalJSON() ([]byte, error)

func (*CreatePoemType) UnmarshalJSON

func (c *CreatePoemType) UnmarshalJSON(b []byte) error

func (CreatePoemType) Value added in v0.0.90

func (c CreatePoemType) Value() int32

type CreatePoemTypeEnum

type CreatePoemTypeEnum struct {
	E_0 CreatePoemType
	E_1 CreatePoemType
	E_2 CreatePoemType
	E_3 CreatePoemType
}

func GetCreatePoemTypeEnum

func GetCreatePoemTypeEnum() CreatePoemTypeEnum

type DependencyParserRequest

type DependencyParserRequest struct {

	// 待分析文本,长度为1~32,文本编码为utf-8。
	Text string `json:"text"`

	// 支持的文本语言类型,目前只支持中文,默认为zh。
	Lang *DependencyParserRequestLang `json:"lang,omitempty"`
}

依存句法分析请求体

func (DependencyParserRequest) String

func (o DependencyParserRequest) String() string

type DependencyParserRequestLang

type DependencyParserRequestLang struct {
	// contains filtered or unexported fields
}

func (DependencyParserRequestLang) MarshalJSON

func (c DependencyParserRequestLang) MarshalJSON() ([]byte, error)

func (*DependencyParserRequestLang) UnmarshalJSON

func (c *DependencyParserRequestLang) UnmarshalJSON(b []byte) error

func (DependencyParserRequestLang) Value added in v0.0.90

type DependencyParserRequestLangEnum

type DependencyParserRequestLangEnum struct {
	ZH DependencyParserRequestLang
}

func GetDependencyParserRequestLangEnum

func GetDependencyParserRequestLangEnum() DependencyParserRequestLangEnum

type DependencyParserWord

type DependencyParserWord struct {

	// 词汇id
	Id int32 `json:"id"`

	// 词汇内容
	Word string `json:"word"`

	// 头节点ID,根节点默认为0
	HeadWordId int32 `json:"head_word_id"`

	// 词性
	Pos string `json:"pos"`

	// 词与头节点的依存关系,包括以下几种类型 1.根节点root 根节点是指整个句子的谓语动词。 如:我/爱/妈妈(root->爱)。 2.同主语同宾语关系sasubj-obj  (same subject and object) 同主语同宾语关系是指句子中属于同一级且具有相同的主语和宾语的两个动词。 如:我/一直在/研究/和/思考/这个/问题/。(研究–>思考)。 3.同主语关系sasubj (same subject) 同主语关系是指句子中属于同一级且具有相同的主语中的两个动词。 如:我/走进/操场/打/篮球/。(走进–>打)。 4.不同主语关系dfsubj (different subject ) 不同主语关系是指句子中属于同一级且具有不同的主语的两个动词。 如:我/走进/操场/打/篮球/。(走进–>打)。 5.主语关系subj (subject) 主语关系是指动词的主语 如:我/爱/妈妈(我<-爱)。 6.主谓谓语中的内部主语关系subj-in (subject inside a subject-predicate predicate) 句子中一个主谓短语,是对主语动作或状态的陈述或说明时,那么就认为这个主谓短语整体作为谓语。 为了区分两个主语,里面那个主语的依存关系类型为subj-in,外面的主语的依存关系类型为subj。 如:他/确实/头/疼(头<–疼)。 7.宾语关系obj (object) 宾语是指谓语动词的承受对象,即受事。 如:我/爱/妈妈(爱->妈妈)。 8.谓语关系pred (predicate) 兼语结构句式一般有两个动词(V1+N+V2),其中N 是V1 的宾语,同时又是V2 的主语,V2即为N的谓语。 如:命令 /他/扫地(他–>扫地)。 9.定语关系att (attribute) 定语关系是指定语和中心词之间的关系,定语对中心词起修饰或限制作用。 如:国家/主席(国家<–主席)。 10.状语关系adv (adverbial) 状语一般修饰谓语动词或形容词,状语在核心词的前面。 如:非常/喜欢(非常<–喜欢)。 11.补语关系cmp (complement) 补语一般修饰谓语动词或形容词,补语在核心词的后面(和状语相反)。 如:洗/干净/手(洗–>干净)。 12.并列关系coo (coordination ) 并列关系是指两个相同性质的词并列在一起。 如:鲜花/和/掌声(鲜花–>掌声)。 13.介宾关系pobj (preposition-object) 介词后面的名词或代词称为介词宾语。 如:在/家/看书(在–>家)。 14.间接宾语关系iobj (indirect-object) 有些动词可以同时支配两个宾语。为了区分,将第一个宾语称为间接宾语。 如:给/他/书(给–>他)。 15.“的”字关系de (de-construction) “的”字关系是指“的” 后面很明显应该有名词或代词,但被省略,此时“的”与前面的成分构成“的”字关系。 如:这/是/他/的(他<–的)。 16.附加关系adjct (adjunct) 附加关系是指一些句子中没有实际意义的、只是为了让句子结构完整、或者讲起来更有韵味(抑扬顿挫)的词语。 如:我/走/了(走–>了)。 17.称呼关系app (appellation) 称呼关系是指对人的称呼,主要是口语中的现象。 如:老师/,/你/好(老师<–好)。 18.进一步解释关系exp (explanation) 汉语书面语中,常常会使用括号在原本流畅的表达中,插入一些解释说明的话。括号中的内容如果是解释说明对应的词、或短语、或句子则为进一步解释关系。 如:普京/(/俄罗斯/总统/)(普京–>总统)。 19.标点关系punc (punctuation) 标点符号依存于其前面句子的核心词。 如:我/爱/妈妈(爱->。)。 20.片段关系frag (fragment) 片段关系是指汉语中不符合语法、支离破碎、病句的汉语句子。 如:你/,/我/,/中国/。(你–>我–>中国)。 21.重复关系repet (repetition) 重复关系是指汉语口语中出现说话结巴、重复称呼、表示强调等情况。 如:你 吃/,/吃/饭/了/吗/?(吃–>吃)。
	DependencyLabel DependencyParserWordDependencyLabel `json:"dependency_label"`
}

依存句法分析结果词汇单元结构体

func (DependencyParserWord) String

func (o DependencyParserWord) String() string

type DependencyParserWordDependencyLabel

type DependencyParserWordDependencyLabel struct {
	// contains filtered or unexported fields
}

func (DependencyParserWordDependencyLabel) MarshalJSON

func (c DependencyParserWordDependencyLabel) MarshalJSON() ([]byte, error)

func (*DependencyParserWordDependencyLabel) UnmarshalJSON

func (c *DependencyParserWordDependencyLabel) UnmarshalJSON(b []byte) error

func (DependencyParserWordDependencyLabel) Value added in v0.0.90

type DocumentClassificationReq

type DocumentClassificationReq struct {

	// 输入的文档,最大长度10000, 长度超过10000字符截取前10000个字符。
	Content string `json:"content"`

	// 预留字段,支持的文本语言类型,当前只支持zh(中文),默认zh。
	Lang *DocumentClassificationReqLang `json:"lang,omitempty"`
}

func (DocumentClassificationReq) String

func (o DocumentClassificationReq) String() string

type DocumentClassificationReqLang

type DocumentClassificationReqLang struct {
	// contains filtered or unexported fields
}

func (DocumentClassificationReqLang) MarshalJSON

func (c DocumentClassificationReqLang) MarshalJSON() ([]byte, error)

func (*DocumentClassificationReqLang) UnmarshalJSON

func (c *DocumentClassificationReqLang) UnmarshalJSON(b []byte) error

func (DocumentClassificationReqLang) Value added in v0.0.90

type DocumentClassificationReqLangEnum

type DocumentClassificationReqLangEnum struct {
	ZH DocumentClassificationReqLang
}

func GetDocumentClassificationReqLangEnum

func GetDocumentClassificationReqLangEnum() DocumentClassificationReqLangEnum

type DomainNamedEntity

type DomainNamedEntity struct {

	// 实体文本。
	Word string `json:"word"`

	// 实体类型,枚举类型。 通用领域:支持人名nr,地名ns,机构名nt,时间点tpt,日期day,百分比pct,货币额度mny,序数词ord,计量规格词qtt,民族race,职业job,邮箱email,国家coun,节日fest。 商务领域:支持公司名com、品牌名bra、职业job、职位post、邮箱email、手机号码cell、电话号码tele、IP地址ip、身份证号id、网址web。 娱乐领域:支持电影名mov、动漫anime、书名book、互联网int、歌名song、产品名pro、电视剧名dra、电视节目名tv。
	Tag string `json:"tag"`

	// 实体文本在待分析文本中的起始位置。
	Offset int32 `json:"offset"`

	// 实体文本长度。
	Len int32 `json:"len"`
}

命名实体类

func (DomainNamedEntity) String

func (o DomainNamedEntity) String() string

type DomainSentimentReq

type DomainSentimentReq struct {

	// 待分析文本。文本编码要求为utf-8。仅支持中文情感分析。 type为1(电商领域评论)时,限定200个字符以内,文本长度超过200个字符时,只检测前200个字符。 type为2(汽车领域评论)时,限定400个字符以内,文本长度超过400个字符时,只检测前400个字符。
	Content string `json:"content"`

	// 取值如下: 0:自适应领域,根据输入内容自动识别适应领域。 1:电商领域,适用于电商领域评论。 2:汽车领域,适用于汽车领域评论。
	Type *DomainSentimentReqType `json:"type,omitempty"`
}

请求消息

func (DomainSentimentReq) String

func (o DomainSentimentReq) String() string

type DomainSentimentReqType

type DomainSentimentReqType struct {
	// contains filtered or unexported fields
}

func (DomainSentimentReqType) MarshalJSON

func (c DomainSentimentReqType) MarshalJSON() ([]byte, error)

func (*DomainSentimentReqType) UnmarshalJSON

func (c *DomainSentimentReqType) UnmarshalJSON(b []byte) error

func (DomainSentimentReqType) Value added in v0.0.90

func (c DomainSentimentReqType) Value() int32

type DomainSentimentReqTypeEnum

type DomainSentimentReqTypeEnum struct {
	E_0 DomainSentimentReqType
	E_1 DomainSentimentReqType
	E_2 DomainSentimentReqType
}

func GetDomainSentimentReqTypeEnum

func GetDomainSentimentReqTypeEnum() DomainSentimentReqTypeEnum

type EntitySentimentReq

type EntitySentimentReq struct {

	// 请求文本。文本编码要求为utf-8,仅支持中文实体情感分析。 限定content+entity长度为512以内,长度超过512时,只检测前512个字符。
	Content string `json:"content"`

	// 请求实体。文本编码要求为utf-8.仅支持中文实体情感分析。 限定content+entity长度为512以内,长度超过512时,只检测前512个字符。
	Entity string `json:"entity"`

	// 取值如下: 3 金融领域
	Type int32 `json:"type"`
}

func (EntitySentimentReq) String

func (o EntitySentimentReq) String() string

type EventExtractionResponseItem

type EventExtractionResponseItem struct {

	// 事件元素列表。
	Argument []EventExtractionResponseItemArgument `json:"argument"`

	// 事件触发词。触发词是事件描述中最能代表事件发生的词汇,决定事件类别的重要特征。
	EventTrigger string `json:"event_trigger"`

	// 事件类型。
	EventType *string `json:"event_type,omitempty"`

	// 事件触发词在待分析文本中的起始和终止位置。
	TriggerSpan []int32 `json:"trigger_span"`
}

events数据结构

func (EventExtractionResponseItem) String

type EventExtractionResponseItemArgument

type EventExtractionResponseItemArgument struct {

	// 元素角色。元素角色指的是事件元素在事件中扮演的角色,是事件元素与事件的语义关系。
	Role string `json:"role"`

	// 实体文本在待分析文本中的起始和终止位置。
	Span []int32 `json:"span"`

	// 实体文本。
	Word string `json:"word"`
}

事件元素

func (EventExtractionResponseItemArgument) String

type FileTranslationReq

type FileTranslationReq struct {

	// 存放在OBS的文档文件路径,私密文件推荐使用临时授权URL调用服务,如何获取OBS文件URL和临时授权URL请参见配置OBS访问权限(https://support.huaweicloud.com/api-nlp/nlp_03_0080.html)。OBS的region要和请求服务的region保持一致,region不一致则OBS不可用,即使obs是公开访问权限。
	Url string `json:"url"`

	// 翻译原语言,文档翻译服务当前仅支持中英互译。
	From FileTranslationReqFrom `json:"from"`

	// 翻译目标语言,文档翻译服务当前仅支持中英互译。
	To FileTranslationReqTo `json:"to"`

	// 文档格式,当前仅支持翻译“docx”、“pptx”和“txt”格式的文档。
	Type FileTranslationReqType `json:"type"`
}

This is a auto create Body Object

func (FileTranslationReq) String

func (o FileTranslationReq) String() string

type FileTranslationReqFrom

type FileTranslationReqFrom struct {
	// contains filtered or unexported fields
}

func (FileTranslationReqFrom) MarshalJSON

func (c FileTranslationReqFrom) MarshalJSON() ([]byte, error)

func (*FileTranslationReqFrom) UnmarshalJSON

func (c *FileTranslationReqFrom) UnmarshalJSON(b []byte) error

func (FileTranslationReqFrom) Value added in v0.0.90

func (c FileTranslationReqFrom) Value() string

type FileTranslationReqFromEnum

type FileTranslationReqFromEnum struct {
	ZH FileTranslationReqFrom
	EN FileTranslationReqFrom
}

func GetFileTranslationReqFromEnum

func GetFileTranslationReqFromEnum() FileTranslationReqFromEnum

type FileTranslationReqTo

type FileTranslationReqTo struct {
	// contains filtered or unexported fields
}

func (FileTranslationReqTo) MarshalJSON

func (c FileTranslationReqTo) MarshalJSON() ([]byte, error)

func (*FileTranslationReqTo) UnmarshalJSON

func (c *FileTranslationReqTo) UnmarshalJSON(b []byte) error

func (FileTranslationReqTo) Value added in v0.0.90

func (c FileTranslationReqTo) Value() string

type FileTranslationReqToEnum

type FileTranslationReqToEnum struct {
	ZH FileTranslationReqTo
	EN FileTranslationReqTo
}

func GetFileTranslationReqToEnum

func GetFileTranslationReqToEnum() FileTranslationReqToEnum

type FileTranslationReqType

type FileTranslationReqType struct {
	// contains filtered or unexported fields
}

func (FileTranslationReqType) MarshalJSON

func (c FileTranslationReqType) MarshalJSON() ([]byte, error)

func (*FileTranslationReqType) UnmarshalJSON

func (c *FileTranslationReqType) UnmarshalJSON(b []byte) error

func (FileTranslationReqType) Value added in v0.0.90

func (c FileTranslationReqType) Value() string

type FileTranslationReqTypeEnum

type FileTranslationReqTypeEnum struct {
	DOCX FileTranslationReqType
	PPTX FileTranslationReqType
	TXT  FileTranslationReqType
}

func GetFileTranslationReqTypeEnum

func GetFileTranslationReqTypeEnum() FileTranslationReqTypeEnum

type HwCloudSentimentReq

type HwCloudSentimentReq struct {

	// 待分析文本。文本编码要求为utf-8。仅支持中文和英文情感分析。 限定180个字符以内,超过180个字符,只截取前180个字符。
	Content string `json:"content"`

	// 支持的文本语言类型,目前支持中文(zh)和英文(en),默认为中文。
	Lang *HwCloudSentimentReqLang `json:"lang,omitempty"`
}

func (HwCloudSentimentReq) String

func (o HwCloudSentimentReq) String() string

type HwCloudSentimentReqLang

type HwCloudSentimentReqLang struct {
	// contains filtered or unexported fields
}

func (HwCloudSentimentReqLang) MarshalJSON

func (c HwCloudSentimentReqLang) MarshalJSON() ([]byte, error)

func (*HwCloudSentimentReqLang) UnmarshalJSON

func (c *HwCloudSentimentReqLang) UnmarshalJSON(b []byte) error

func (HwCloudSentimentReqLang) Value added in v0.0.90

func (c HwCloudSentimentReqLang) Value() string

type HwCloudSentimentReqLangEnum

type HwCloudSentimentReqLangEnum struct {
	EN HwCloudSentimentReqLang
	ZH HwCloudSentimentReqLang
}

func GetHwCloudSentimentReqLangEnum

func GetHwCloudSentimentReqLangEnum() HwCloudSentimentReqLangEnum

type HwCloudSentimentResp

type HwCloudSentimentResp struct {

	// 该文本的分析结果标签,取值如下: 0 负向 1 正向
	Label int32 `json:"label"`

	// 标签label的置信度。小数点精确到(6)位。
	Confidence float32 `json:"confidence"`

	// 待分析文本
	Content string `json:"content"`
}

result字段数据结构说明

func (HwCloudSentimentResp) String

func (o HwCloudSentimentResp) String() string

type IntentReq

type IntentReq struct {

	// 支持的文本语言类型,目前只支持中文,默认为zh。
	Lang *IntentReqLang `json:"lang,omitempty"`

	// 待分析文本列表,UTF-8编码,限定32个字符以内,文本长度超过32个字符时,只检测前32个字符。
	Text string `json:"text"`
}

func (IntentReq) String

func (o IntentReq) String() string

type IntentReqLang

type IntentReqLang struct {
	// contains filtered or unexported fields
}

func (IntentReqLang) MarshalJSON

func (c IntentReqLang) MarshalJSON() ([]byte, error)

func (*IntentReqLang) UnmarshalJSON

func (c *IntentReqLang) UnmarshalJSON(b []byte) error

func (IntentReqLang) Value added in v0.0.90

func (c IntentReqLang) Value() string

type IntentReqLangEnum

type IntentReqLangEnum struct {
	ZH IntentReqLang
}

func GetIntentReqLangEnum

func GetIntentReqLangEnum() IntentReqLangEnum

type IntentResult

type IntentResult struct {

	// 标签label的置信度。
	Confidence float32 `json:"confidence"`

	// 文本的意图标签。标签共有以下9类,取值如下: weather:天气 time:报时 news:新闻 joke:笑话 translation:翻译 notification:提醒 alarm:闹钟 music:音乐 other:其它
	Label string `json:"label"`

	// slot数据结构
	Slots []Slot `json:"slots"`

	// 返回待分析文本。
	Text string `json:"text"`
}

func (IntentResult) String

func (o IntentResult) String() string

type KeywordExtractReq

type KeywordExtractReq struct {

	// 待分析文本,长度为1~512,文本编码为UTF-8。
	Text string `json:"text"`

	// 返回关键词的最大数量,默认为5。
	Limit *int32 `json:"limit,omitempty"`

	// 支持的文本语言类型,目前只支持中文,默认为zh。
	Lang *KeywordExtractReqLang `json:"lang,omitempty"`
}

This is a auto create Body Object

func (KeywordExtractReq) String

func (o KeywordExtractReq) String() string

type KeywordExtractReqLang

type KeywordExtractReqLang struct {
	// contains filtered or unexported fields
}

func (KeywordExtractReqLang) MarshalJSON

func (c KeywordExtractReqLang) MarshalJSON() ([]byte, error)

func (*KeywordExtractReqLang) UnmarshalJSON

func (c *KeywordExtractReqLang) UnmarshalJSON(b []byte) error

func (KeywordExtractReqLang) Value added in v0.0.90

func (c KeywordExtractReqLang) Value() string

type KeywordExtractReqLangEnum

type KeywordExtractReqLangEnum struct {
	ZH KeywordExtractReqLang
}

func GetKeywordExtractReqLangEnum

func GetKeywordExtractReqLangEnum() KeywordExtractReqLangEnum

type LanguageDetectionReq

type LanguageDetectionReq struct {

	// 需要识别语种的文本。仅支持utf-8编码,长度不超过2000字符。
	Text string `json:"text"`
}

This is a auto create Body Object

func (LanguageDetectionReq) String

func (o LanguageDetectionReq) String() string

type LinkedEntity

type LinkedEntity struct {

	// 实体指称
	Mention string `json:"mention"`

	// 偏移量
	Offset int32 `json:"offset"`

	// 实体名称
	EntityTitle string `json:"entity_title"`
}

链接的实体 类

func (LinkedEntity) String

func (o LinkedEntity) String() string

type NamedEntity

type NamedEntity struct {

	// 实体文本。
	Word string `json:"word"`

	// 实体类型,枚举类型。 中文支持人名“nr”,地名“ns”,机构名“nt”,时间“t”。 英文支持人名“per”,地名“loc”,机构名“org”,时间“t”。 西班牙文支持人名“per”,地名“loc”,机构名“org”,时间“t”。
	Tag string `json:"tag"`

	// 实体文本在待分析文本中的起始位置。
	Offset int32 `json:"offset"`

	// 实体文本长度。
	Len int32 `json:"len"`
}

命名实体。

func (NamedEntity) String

func (o NamedEntity) String() string

type NerRequest

type NerRequest struct {

	// 待分析文本,中文长度为1~512,英文和西班牙文长度为1~2000,文本编码为UTF-8。
	Text string `json:"text"`

	// 支持的文本语言类型,目前支持中文(zh),英文(en),和西班牙文(es),默认为中文。
	Lang *NerRequestLang `json:"lang,omitempty"`
}

命名实体识别post请求体

func (NerRequest) String

func (o NerRequest) String() string

type NerRequestLang

type NerRequestLang struct {
	// contains filtered or unexported fields
}

func (NerRequestLang) MarshalJSON

func (c NerRequestLang) MarshalJSON() ([]byte, error)

func (*NerRequestLang) UnmarshalJSON

func (c *NerRequestLang) UnmarshalJSON(b []byte) error

func (NerRequestLang) Value added in v0.0.90

func (c NerRequestLang) Value() string

type NerRequestLangEnum

type NerRequestLangEnum struct {
	ZH NerRequestLang
	EN NerRequestLang
	ES NerRequestLang
}

func GetNerRequestLangEnum

func GetNerRequestLangEnum() NerRequestLangEnum

type PostDomainNerRequest

type PostDomainNerRequest struct {

	// 待分析文本,长度为1~512,文本编码为UTF-8。
	Text string `json:"text"`

	// 支持的文本语言类型,目前只支持中文,默认为zh。
	Lang *PostDomainNerRequestLang `json:"lang,omitempty"`

	// 支持的领域类型,目前支持通用(general)领域、商务(business)领域、娱乐(entertainment)领域,默认为general。
	Domain *PostDomainNerRequestDomain `json:"domain,omitempty"`
}

命名实体识别post请求体

func (PostDomainNerRequest) String

func (o PostDomainNerRequest) String() string

type PostDomainNerRequestDomain

type PostDomainNerRequestDomain struct {
	// contains filtered or unexported fields
}

func (PostDomainNerRequestDomain) MarshalJSON

func (c PostDomainNerRequestDomain) MarshalJSON() ([]byte, error)

func (*PostDomainNerRequestDomain) UnmarshalJSON

func (c *PostDomainNerRequestDomain) UnmarshalJSON(b []byte) error

func (PostDomainNerRequestDomain) Value added in v0.0.90

type PostDomainNerRequestDomainEnum

type PostDomainNerRequestDomainEnum struct {
	GENERAL       PostDomainNerRequestDomain
	BUSINESS      PostDomainNerRequestDomain
	ENTERTAINMENT PostDomainNerRequestDomain
}

func GetPostDomainNerRequestDomainEnum

func GetPostDomainNerRequestDomainEnum() PostDomainNerRequestDomainEnum

type PostDomainNerRequestLang

type PostDomainNerRequestLang struct {
	// contains filtered or unexported fields
}

func (PostDomainNerRequestLang) MarshalJSON

func (c PostDomainNerRequestLang) MarshalJSON() ([]byte, error)

func (*PostDomainNerRequestLang) UnmarshalJSON

func (c *PostDomainNerRequestLang) UnmarshalJSON(b []byte) error

func (PostDomainNerRequestLang) Value added in v0.0.90

func (c PostDomainNerRequestLang) Value() string

type PostDomainNerRequestLangEnum

type PostDomainNerRequestLangEnum struct {
	ZH PostDomainNerRequestLang
}

func GetPostDomainNerRequestLangEnum

func GetPostDomainNerRequestLangEnum() PostDomainNerRequestLangEnum

type PostEntityLinkingRequest

type PostEntityLinkingRequest struct {

	// 待分析文本,长度为1~50,文本编码为UTF-8。
	Text string `json:"text"`

	// 支持的文本语言类型,目前只支持中文,默认为zh。
	Lang *PostEntityLinkingRequestLang `json:"lang,omitempty"`
}

实体链接post请求体

func (PostEntityLinkingRequest) String

func (o PostEntityLinkingRequest) String() string

type PostEntityLinkingRequestLang

type PostEntityLinkingRequestLang struct {
	// contains filtered or unexported fields
}

func (PostEntityLinkingRequestLang) MarshalJSON

func (c PostEntityLinkingRequestLang) MarshalJSON() ([]byte, error)

func (*PostEntityLinkingRequestLang) UnmarshalJSON

func (c *PostEntityLinkingRequestLang) UnmarshalJSON(b []byte) error

func (PostEntityLinkingRequestLang) Value added in v0.0.90

type PostEntityLinkingRequestLangEnum

type PostEntityLinkingRequestLangEnum struct {
	ZH PostEntityLinkingRequestLang
}

func GetPostEntityLinkingRequestLangEnum

func GetPostEntityLinkingRequestLangEnum() PostEntityLinkingRequestLangEnum

type PostEventExtractionReq

type PostEventExtractionReq struct {

	// 待分析文本,长度为1~256,文本编码为UTF-8。
	Text string `json:"text"`
}

This is a auto create Body Object

func (PostEventExtractionReq) String

func (o PostEventExtractionReq) String() string

type PostMultiGainedSegmentResponseItem

type PostMultiGainedSegmentResponseItem struct {

	// 当前节点对应的文本内容
	Content string `json:"content"`

	// 文本类型,取值如下: WORD-词汇类型 CHAR-字符类型
	Type PostMultiGainedSegmentResponseItemType `json:"type"`

	// 当前节点的子节点列表
	SubContents *[]PostMultiGainedSegmentResponseItemCopy `json:"sub_contents,omitempty"`
}

多粒度分词结果中的词汇节点

func (PostMultiGainedSegmentResponseItem) String

type PostMultiGainedSegmentResponseItemCopy

type PostMultiGainedSegmentResponseItemCopy struct {

	// 当前节点对应的文本内容
	Content string `json:"content"`

	// 文本类型,取值如下: WORD-词汇类型 CHAR-字符类型
	Type PostMultiGainedSegmentResponseItemCopyType `json:"type"`

	// 当前节点的子节点列表
	SubContents *[]PostMultiGainedSegmentResponseItem `json:"sub_contents,omitempty"`
}

多粒度分词结果中的词汇节点

func (PostMultiGainedSegmentResponseItemCopy) String

type PostMultiGainedSegmentResponseItemCopyType

type PostMultiGainedSegmentResponseItemCopyType struct {
	// contains filtered or unexported fields
}

func (PostMultiGainedSegmentResponseItemCopyType) MarshalJSON

func (*PostMultiGainedSegmentResponseItemCopyType) UnmarshalJSON

func (PostMultiGainedSegmentResponseItemCopyType) Value added in v0.0.90

type PostMultiGainedSegmentResponseItemType

type PostMultiGainedSegmentResponseItemType struct {
	// contains filtered or unexported fields
}

func (PostMultiGainedSegmentResponseItemType) MarshalJSON

func (c PostMultiGainedSegmentResponseItemType) MarshalJSON() ([]byte, error)

func (*PostMultiGainedSegmentResponseItemType) UnmarshalJSON

func (c *PostMultiGainedSegmentResponseItemType) UnmarshalJSON(b []byte) error

func (PostMultiGainedSegmentResponseItemType) Value added in v0.0.90

type PostMultiGainedSegmentResponseItemTypeEnum

type PostMultiGainedSegmentResponseItemTypeEnum struct {
	WORD PostMultiGainedSegmentResponseItemType
	CHAR PostMultiGainedSegmentResponseItemType
}

func GetPostMultiGainedSegmentResponseItemTypeEnum

func GetPostMultiGainedSegmentResponseItemTypeEnum() PostMultiGainedSegmentResponseItemTypeEnum

type PostMultiGrainedSegmentReq

type PostMultiGrainedSegmentReq struct {

	// 待分词文本,长度为1~64,文本编码为UTF-8。
	Text string `json:"text"`

	// 支持的文本语言类型,目前只支持中文,默认为zh。
	Lang *PostMultiGrainedSegmentReqLang `json:"lang,omitempty"`

	// 分词粒度,1为最细粒度,2为最粗粒度,其它情况默认返回全部粒度分词树结果。
	Granularity *PostMultiGrainedSegmentReqGranularity `json:"granularity,omitempty"`
}

This is a auto create Body Object

func (PostMultiGrainedSegmentReq) String

type PostMultiGrainedSegmentReqGranularity

type PostMultiGrainedSegmentReqGranularity struct {
	// contains filtered or unexported fields
}

func (PostMultiGrainedSegmentReqGranularity) MarshalJSON

func (c PostMultiGrainedSegmentReqGranularity) MarshalJSON() ([]byte, error)

func (*PostMultiGrainedSegmentReqGranularity) UnmarshalJSON

func (c *PostMultiGrainedSegmentReqGranularity) UnmarshalJSON(b []byte) error

func (PostMultiGrainedSegmentReqGranularity) Value added in v0.0.90

type PostMultiGrainedSegmentReqLang

type PostMultiGrainedSegmentReqLang struct {
	// contains filtered or unexported fields
}

func (PostMultiGrainedSegmentReqLang) MarshalJSON

func (c PostMultiGrainedSegmentReqLang) MarshalJSON() ([]byte, error)

func (*PostMultiGrainedSegmentReqLang) UnmarshalJSON

func (c *PostMultiGrainedSegmentReqLang) UnmarshalJSON(b []byte) error

func (PostMultiGrainedSegmentReqLang) Value added in v0.0.90

type PostMultiGrainedSegmentReqLangEnum

type PostMultiGrainedSegmentReqLangEnum struct {
	ZH PostMultiGrainedSegmentReqLang
}

func GetPostMultiGrainedSegmentReqLangEnum

func GetPostMultiGrainedSegmentReqLangEnum() PostMultiGrainedSegmentReqLangEnum

type PostSentenceEmbeddingReq

type PostSentenceEmbeddingReq struct {

	// 文本列表,文本长度为1~512,列表大小为1~1000,文本编码为UTF-8。
	Sentences []string `json:"sentences"`

	// 支持的领域类型,目前只支持通用领域,默认为general。
	Domain *PostSentenceEmbeddingReqDomain `json:"domain,omitempty"`
}

命名实体识别post请求体

func (PostSentenceEmbeddingReq) String

func (o PostSentenceEmbeddingReq) String() string

type PostSentenceEmbeddingReqDomain

type PostSentenceEmbeddingReqDomain struct {
	// contains filtered or unexported fields
}

func (PostSentenceEmbeddingReqDomain) MarshalJSON

func (c PostSentenceEmbeddingReqDomain) MarshalJSON() ([]byte, error)

func (*PostSentenceEmbeddingReqDomain) UnmarshalJSON

func (c *PostSentenceEmbeddingReqDomain) UnmarshalJSON(b []byte) error

func (PostSentenceEmbeddingReqDomain) Value added in v0.0.90

type PostSentenceEmbeddingReqDomainEnum

type PostSentenceEmbeddingReqDomainEnum struct {
	GENERAL PostSentenceEmbeddingReqDomain
}

func GetPostSentenceEmbeddingReqDomainEnum

func GetPostSentenceEmbeddingReqDomainEnum() PostSentenceEmbeddingReqDomainEnum

type RunAspectSentimentAdvanceRequest

type RunAspectSentimentAdvanceRequest struct {
	Body *AspectSentimentAdvanceRequest `json:"body,omitempty"`
}

Request Object

func (RunAspectSentimentAdvanceRequest) String

type RunAspectSentimentAdvanceResponse

type RunAspectSentimentAdvanceResponse struct {

	// 待分析文本
	Content *string `json:"content,omitempty"`

	// 该文本的整体情感标签,取值如下: 0  负向 1  正向
	Label *int32 `json:"label,omitempty"`

	// 该文本整体情感label的置信度,小数点精确到3位。
	Confidence *float32 `json:"confidence,omitempty"`

	// 属性情感挖掘列表
	AspectOpinions *[]AspectAdvanceOpinion `json:"aspect_opinions,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunAspectSentimentAdvanceResponse) String

type RunAspectSentimentRequest

type RunAspectSentimentRequest struct {
	Body *AspectSentimentRequest `json:"body,omitempty"`
}

Request Object

func (RunAspectSentimentRequest) String

func (o RunAspectSentimentRequest) String() string

type RunAspectSentimentResponse

type RunAspectSentimentResponse struct {

	// 待分析文本
	Text *string `json:"text,omitempty"`

	// 该文本的整体情感标签,取值如下: 0  负向 1  正向
	Label *int32 `json:"label,omitempty"`

	// 该文本整体情感label的置信度,小数点精确到3位。
	Confidence *float32 `json:"confidence,omitempty"`

	// 属性级情感挖掘列表
	AspectOpinions *[]AspectOpinion `json:"aspect_opinions,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunAspectSentimentResponse) String

type RunClassificationRequest

type RunClassificationRequest struct {
	Body *ClassificationReq `json:"body,omitempty"`
}

Request Object

func (RunClassificationRequest) String

func (o RunClassificationRequest) String() string

type RunClassificationResponse

type RunClassificationResponse struct {
	Result *ClassificationResult `json:"result,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunClassificationResponse) String

func (o RunClassificationResponse) String() string

type RunConstituencyParserRequest added in v0.0.100

type RunConstituencyParserRequest struct {
	Body *ConstituencyParserReq `json:"body,omitempty"`
}

Request Object

func (RunConstituencyParserRequest) String added in v0.0.100

type RunConstituencyParserResponse added in v0.0.100

type RunConstituencyParserResponse struct {

	// 成分句法分析结果,用嵌套括号的形式表示一棵树。括号内的第一个元素为子树的标签,若是叶子节点则用符号_代替。第二个元素为子树,若是叶子节点则为字符串。
	Tree *string `json:"tree,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunConstituencyParserResponse) String added in v0.0.100

type RunDependencyParserRequest

type RunDependencyParserRequest struct {
	Body *DependencyParserRequest `json:"body,omitempty"`
}

Request Object

func (RunDependencyParserRequest) String

type RunDependencyParserResponse

type RunDependencyParserResponse struct {

	// 依存句法分析结果,词汇集合。调用失败时无此字段。
	Words *[]DependencyParserWord `json:"words,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunDependencyParserResponse) String

type RunDocClassificationRequest

type RunDocClassificationRequest struct {
	Body *DocumentClassificationReq `json:"body,omitempty"`
}

Request Object

func (RunDocClassificationRequest) String

type RunDocClassificationResponse

type RunDocClassificationResponse struct {

	// 标签列表
	Result *interface{} `json:"result,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunDocClassificationResponse) String

type RunDomainSentimentRequest

type RunDomainSentimentRequest struct {
	Body *DomainSentimentReq `json:"body,omitempty"`
}

Request Object

func (RunDomainSentimentRequest) String

func (o RunDomainSentimentRequest) String() string

type RunDomainSentimentResponse

type RunDomainSentimentResponse struct {
	Result *HwCloudSentimentResp `json:"result,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunDomainSentimentResponse) String

type RunEntityLinkingRequest

type RunEntityLinkingRequest struct {
	Body *PostEntityLinkingRequest `json:"body,omitempty"`
}

Request Object

func (RunEntityLinkingRequest) String

func (o RunEntityLinkingRequest) String() string

type RunEntityLinkingResponse

type RunEntityLinkingResponse struct {

	// 识别出的实体列表
	Entities       *[]LinkedEntity `json:"entities,omitempty"`
	HttpStatusCode int             `json:"-"`
}

Response Object

func (RunEntityLinkingResponse) String

func (o RunEntityLinkingResponse) String() string

type RunEntitySentimentRequest

type RunEntitySentimentRequest struct {
	Body *EntitySentimentReq `json:"body,omitempty"`
}

Request Object

func (RunEntitySentimentRequest) String

func (o RunEntitySentimentRequest) String() string

type RunEntitySentimentResponse

type RunEntitySentimentResponse struct {

	// 响应的文本
	Content *string `json:"content,omitempty"`

	// 响应的实体
	Entity *string `json:"entity,omitempty"`

	// 响应的情感标签,0表示负面,1表示非负面,2表示不相关
	Label *int32 `json:"label,omitempty"`

	// 该实体在文本中的情感label的置信度
	Confidence *float64 `json:"confidence,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunEntitySentimentResponse) String

type RunEventExtractionRequest

type RunEventExtractionRequest struct {
	Body *PostEventExtractionReq `json:"body,omitempty"`
}

Request Object

func (RunEventExtractionRequest) String

func (o RunEventExtractionRequest) String() string

type RunEventExtractionResponse

type RunEventExtractionResponse struct {

	// 事件抽取结果。调用失败时无此字段。
	Events *[]EventExtractionResponseItem `json:"events,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunEventExtractionResponse) String

type RunFileTranslationRequest

type RunFileTranslationRequest struct {
	Body *FileTranslationReq `json:"body,omitempty"`
}

Request Object

func (RunFileTranslationRequest) String

func (o RunFileTranslationRequest) String() string

type RunFileTranslationResponse

type RunFileTranslationResponse struct {

	// 创建的任务标识, 如果创建任务成功时必存在。调用失败时无此字段。
	JobId *string `json:"job_id,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunFileTranslationResponse) String

type RunGetFileTranslationResultRequest

type RunGetFileTranslationResultRequest struct {

	// 文档翻译任务标识符。通过文档翻译接口获取。
	JobId string `json:"job_id"`
}

Request Object

func (RunGetFileTranslationResultRequest) String

type RunGetFileTranslationResultResponse

type RunGetFileTranslationResultResponse struct {

	// 当前翻译状态。具体状态如下所示: WAITING 等待翻译。 FINISHED 翻译已经完成。 ERROR 翻译过程中发生错误。 调用失败时无此字段。
	Status *string `json:"status,omitempty"`

	// 临时url,用于获取翻译结果,有效期十分钟。过期后请再次调用接口获取新的url。调用失败时或翻译状态非FINISHED时无此字段。
	Url *string `json:"url,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunGetFileTranslationResultResponse) String

type RunKeywordExtractRequest

type RunKeywordExtractRequest struct {
	Body *KeywordExtractReq `json:"body,omitempty"`
}

Request Object

func (RunKeywordExtractRequest) String

func (o RunKeywordExtractRequest) String() string

type RunKeywordExtractResponse

type RunKeywordExtractResponse struct {

	// 关键词列表。调用失败时无此字段。
	Words *[]string `json:"words,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunKeywordExtractResponse) String

func (o RunKeywordExtractResponse) String() string

type RunLanguageDetectionRequest

type RunLanguageDetectionRequest struct {
	Body *LanguageDetectionReq `json:"body,omitempty"`
}

Request Object

func (RunLanguageDetectionRequest) String

type RunLanguageDetectionResponse

type RunLanguageDetectionResponse struct {

	// 调用成功时表示调用结果,语种缩写对应名称如下: 阿拉伯语 ar 爱沙尼亚语 et 保加利亚语 bg 冰岛语 is 波兰语 pl 波斯尼亚语 bs 波斯语 fa 丹麦语 da 德语 de 俄语 ru 法语 fr 芬兰语 fi 高棉语 km 韩语 ko 加泰罗尼亚语 ca 捷克语 cs 克罗地亚语 hr 拉脱维亚语 lv 立陶宛语 lt 罗马尼亚语 ro 马耳他语 mt 马来西亚语 ms 马其顿语 mk 孟加拉语 bn 缅甸语 my 南非荷兰语 af 挪威语 no 葡萄牙语 pt 日语 ja 瑞典语 sv 塞尔维亚语 sr 斯洛伐克语 sk 斯洛文尼亚语 sl 斯瓦希里语 sw 泰语 th 土耳其语 tr 威尔士语 cy 乌尔都语 ur 乌克兰语 uk 西班牙语 es 希伯来语 he 希腊语 el 匈牙利语 hu 意大利语 it 印地语 hi 印尼语 id 英语 en 越南语 vi 中文 zh 无法识别语种 unk 当输入文本过短或不明确时,识别结果可能不准确; 当输入文本包含多种语言时,会返回占比最高的语种。 调用失败时无此字段。
	DetectedLanguage *string `json:"detected_language,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunLanguageDetectionResponse) String

type RunMultiGrainedSegmentRequest

type RunMultiGrainedSegmentRequest struct {
	Body *PostMultiGrainedSegmentReq `json:"body,omitempty"`
}

Request Object

func (RunMultiGrainedSegmentRequest) String

type RunMultiGrainedSegmentResponse

type RunMultiGrainedSegmentResponse struct {

	// 多粒度分词结果列表。调用失败时无此字段。
	Result *[]PostMultiGainedSegmentResponseItem `json:"result,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunMultiGrainedSegmentResponse) String

type RunNerDomainRequest

type RunNerDomainRequest struct {
	Body *PostDomainNerRequest `json:"body,omitempty"`
}

Request Object

func (RunNerDomainRequest) String

func (o RunNerDomainRequest) String() string

type RunNerDomainResponse

type RunNerDomainResponse struct {

	// 命名实体识别结果。调用失败时无此字段。
	NamedEntities *[]DomainNamedEntity `json:"named_entities,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunNerDomainResponse) String

func (o RunNerDomainResponse) String() string

type RunNerRequest

type RunNerRequest struct {
	Body *NerRequest `json:"body,omitempty"`
}

Request Object

func (RunNerRequest) String

func (o RunNerRequest) String() string

type RunNerResponse

type RunNerResponse struct {

	// 命名实体识别结果。调用失败时无此字段。
	NamedEntities *[]NamedEntity `json:"named_entities,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunNerResponse) String

func (o RunNerResponse) String() string

type RunPoemRequest

type RunPoemRequest struct {
	Body *CreatePoem `json:"body,omitempty"`
}

Request Object

func (RunPoemRequest) String

func (o RunPoemRequest) String() string

type RunPoemResponse

type RunPoemResponse struct {

	// 根据文本请求体,返回生成的诗歌。调用失败时无此字段。
	Poem *[]string `json:"poem,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunPoemResponse) String

func (o RunPoemResponse) String() string

type RunSegmentRequest

type RunSegmentRequest struct {
	Body *SegmentRequest `json:"body,omitempty"`
}

Request Object

func (RunSegmentRequest) String

func (o RunSegmentRequest) String() string

type RunSegmentResponse

type RunSegmentResponse struct {

	// 分词结果。调用失败时无此字段。
	Words *[]Word `json:"words,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunSegmentResponse) String

func (o RunSegmentResponse) String() string

type RunSemanticParserRequest

type RunSemanticParserRequest struct {
	Body *IntentReq `json:"body,omitempty"`
}

Request Object

func (RunSemanticParserRequest) String

func (o RunSemanticParserRequest) String() string

type RunSemanticParserResponse

type RunSemanticParserResponse struct {
	Result *IntentResult `json:"result,omitempty"`

	// 调用失败时的错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunSemanticParserResponse) String

func (o RunSemanticParserResponse) String() string

type RunSentenceEmbeddingRequest

type RunSentenceEmbeddingRequest struct {
	Body *PostSentenceEmbeddingReq `json:"body,omitempty"`
}

Request Object

func (RunSentenceEmbeddingRequest) String

type RunSentenceEmbeddingResponse

type RunSentenceEmbeddingResponse struct {

	// 句向量结果列表,按输入句子顺序返回句向量。调用失败时无此字段。
	Vectors *[][]float32 `json:"vectors,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunSentenceEmbeddingResponse) String

type RunSentimentRequest

type RunSentimentRequest struct {
	Body *HwCloudSentimentReq `json:"body,omitempty"`
}

Request Object

func (RunSentimentRequest) String

func (o RunSentimentRequest) String() string

type RunSentimentResponse

type RunSentimentResponse struct {
	Result *HwCloudSentimentResp `json:"result,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunSentimentResponse) String

func (o RunSentimentResponse) String() string

type RunSummaryDomainRequest

type RunSummaryDomainRequest struct {
	Body *SummaryDomainReq `json:"body,omitempty"`
}

Request Object

func (RunSummaryDomainRequest) String

func (o RunSummaryDomainRequest) String() string

type RunSummaryDomainResponse

type RunSummaryDomainResponse struct {

	// 根据文本请求体,返回摘要结果。调用失败时无此字段。
	Summary *string `json:"summary,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunSummaryDomainResponse) String

func (o RunSummaryDomainResponse) String() string

type RunSummaryRequest

type RunSummaryRequest struct {
	Body *SummaryReq `json:"body,omitempty"`
}

Request Object

func (RunSummaryRequest) String

func (o RunSummaryRequest) String() string

type RunSummaryResponse

type RunSummaryResponse struct {

	// 根据文本请求体,返回摘要结果。调用失败时无此字段。
	Summary *string `json:"summary,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunSummaryResponse) String

func (o RunSummaryResponse) String() string

type RunTextSimilarityAdvanceRequest

type RunTextSimilarityAdvanceRequest struct {
	Body *TextSimilarityAdvanceRequest `json:"body,omitempty"`
}

Request Object

func (RunTextSimilarityAdvanceRequest) String

type RunTextSimilarityAdvanceResponse

type RunTextSimilarityAdvanceResponse struct {

	// 相似度得分,范围在0~1,默认小数点后保留8位。调用失败时无此字段。
	Similarity *float32 `json:"similarity,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunTextSimilarityAdvanceResponse) String

type RunTextSimilarityRequest

type RunTextSimilarityRequest struct {
	Body *TextSimilarityRequest `json:"body,omitempty"`
}

Request Object

func (RunTextSimilarityRequest) String

func (o RunTextSimilarityRequest) String() string

type RunTextSimilarityResponse

type RunTextSimilarityResponse struct {

	// 相似度得分,范围在0~1,默认小数点后保留8位。调用失败时无此字段。
	Similarity *float32 `json:"similarity,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunTextSimilarityResponse) String

func (o RunTextSimilarityResponse) String() string

type RunTextTranslationRequest

type RunTextTranslationRequest struct {
	Body *TextTranslationReq `json:"body,omitempty"`
}

Request Object

func (RunTextTranslationRequest) String

func (o RunTextTranslationRequest) String() string

type RunTextTranslationResponse

type RunTextTranslationResponse struct {

	// 翻译原文,编码格式为UTF-8。调用失败时无此字段。
	SrcText *string `json:"src_text,omitempty"`

	// 翻译译文,编码格式为UTF-8。调用失败时无此字段。
	TranslatedText *string `json:"translated_text,omitempty"`

	// 调用失败时的错误码,具体请参见错误码。调用成功时无此字段。
	ErrorCode *string `json:"error_code,omitempty"`

	// 调用失败时的错误信息。调用成功时无此字段。
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunTextTranslationResponse) String

type SegmentRequest

type SegmentRequest struct {

	// 待分词文本,长度为1~512,文本编码为UTF-8。
	Text string `json:"text"`

	// 是否开启词性标注功能,1为开启,0为关闭,默认为关闭。
	PosSwitch *SegmentRequestPosSwitch `json:"pos_switch,omitempty"`

	// 支持的文本语言类型,目前支持中文(zh)和英文(en),默认为中文。
	Lang *SegmentRequestLang `json:"lang,omitempty"`

	// 支持的分词规范。 中文分词标准目前支持PKU(北大分词标准)、CTB(宾州中文树库标准),默认为PKU。 英文分词标准默认为Penn TreeBank(宾州树库标准),不需要传入该参数。
	Criterion *SegmentRequestCriterion `json:"criterion,omitempty"`
}

分词post请求体

func (SegmentRequest) String

func (o SegmentRequest) String() string

type SegmentRequestCriterion

type SegmentRequestCriterion struct {
	// contains filtered or unexported fields
}

func (SegmentRequestCriterion) MarshalJSON

func (c SegmentRequestCriterion) MarshalJSON() ([]byte, error)

func (*SegmentRequestCriterion) UnmarshalJSON

func (c *SegmentRequestCriterion) UnmarshalJSON(b []byte) error

func (SegmentRequestCriterion) Value added in v0.0.90

func (c SegmentRequestCriterion) Value() string

type SegmentRequestCriterionEnum

type SegmentRequestCriterionEnum struct {
	PKU SegmentRequestCriterion
	CTB SegmentRequestCriterion
}

func GetSegmentRequestCriterionEnum

func GetSegmentRequestCriterionEnum() SegmentRequestCriterionEnum

type SegmentRequestLang

type SegmentRequestLang struct {
	// contains filtered or unexported fields
}

func (SegmentRequestLang) MarshalJSON

func (c SegmentRequestLang) MarshalJSON() ([]byte, error)

func (*SegmentRequestLang) UnmarshalJSON

func (c *SegmentRequestLang) UnmarshalJSON(b []byte) error

func (SegmentRequestLang) Value added in v0.0.90

func (c SegmentRequestLang) Value() string

type SegmentRequestLangEnum

type SegmentRequestLangEnum struct {
	ZH SegmentRequestLang
	EN SegmentRequestLang
}

func GetSegmentRequestLangEnum

func GetSegmentRequestLangEnum() SegmentRequestLangEnum

type SegmentRequestPosSwitch

type SegmentRequestPosSwitch struct {
	// contains filtered or unexported fields
}

func (SegmentRequestPosSwitch) MarshalJSON

func (c SegmentRequestPosSwitch) MarshalJSON() ([]byte, error)

func (*SegmentRequestPosSwitch) UnmarshalJSON

func (c *SegmentRequestPosSwitch) UnmarshalJSON(b []byte) error

func (SegmentRequestPosSwitch) Value added in v0.0.90

func (c SegmentRequestPosSwitch) Value() int32

type SegmentRequestPosSwitchEnum

type SegmentRequestPosSwitchEnum struct {
	E_0 SegmentRequestPosSwitch
	E_1 SegmentRequestPosSwitch
}

func GetSegmentRequestPosSwitchEnum

func GetSegmentRequestPosSwitchEnum() SegmentRequestPosSwitchEnum

type Slot

type Slot struct {

	// 实体文本。
	Word string `json:"word"`

	// 实体类型。对于每个意图类别所支持的实体类型分别为: weather:date(日期),time(时间),location(位置) time:location(位置),timezone(时区) news:genre(风格) joke:genre(风格) translation:content(内容) notification:content(内容),date(日期),time(时间),singer(歌手) alarm:date(日期),time:(时间) music:singer(歌手),song(歌曲),content(内容)
	Tag string `json:"tag"`

	// 实体文本在待分析文本中的起始位置。
	Offset int32 `json:"offset"`

	// 实体文本长度。
	Length int32 `json:"length"`

	// 同义词或者其他标准表达的词,默认为原始的word。
	NormalizedWord string `json:"normalized_word"`
}

func (Slot) String

func (o Slot) String() string

type SummaryDomainReq

type SummaryDomainReq struct {

	// 生成摘要的长度限制。length_limit > 1,则返回结果为字数不小于该值且最接近该值的摘要。 0 <= length_limit <= 1,则返回结果为长度百分比不小于该值且最接近该值的摘要。
	LengthLimit *float32 `json:"length_limit,omitempty"`

	// 文本标题(目前仅支持UTF-8编码),长度不超过1000字。
	Title *string `json:"title,omitempty"`

	// 支持的文本语言类型,目前支持中文(zh)。
	Lang *SummaryDomainReqLang `json:"lang,omitempty"`

	// 文本正文(目前仅支持UTF-8编码),长度不超过10000字。
	Content string `json:"content"`

	// 支持的领域类型,取值如下(目前只支持通用领域),默认为通用领域: 0:通用领域
	Type *SummaryDomainReqType `json:"type,omitempty"`
}

This is a auto create Body Object

func (SummaryDomainReq) String

func (o SummaryDomainReq) String() string

type SummaryDomainReqLang

type SummaryDomainReqLang struct {
	// contains filtered or unexported fields
}

func (SummaryDomainReqLang) MarshalJSON

func (c SummaryDomainReqLang) MarshalJSON() ([]byte, error)

func (*SummaryDomainReqLang) UnmarshalJSON

func (c *SummaryDomainReqLang) UnmarshalJSON(b []byte) error

func (SummaryDomainReqLang) Value added in v0.0.90

func (c SummaryDomainReqLang) Value() string

type SummaryDomainReqLangEnum

type SummaryDomainReqLangEnum struct {
	ZH SummaryDomainReqLang
}

func GetSummaryDomainReqLangEnum

func GetSummaryDomainReqLangEnum() SummaryDomainReqLangEnum

type SummaryDomainReqType

type SummaryDomainReqType struct {
	// contains filtered or unexported fields
}

func (SummaryDomainReqType) MarshalJSON

func (c SummaryDomainReqType) MarshalJSON() ([]byte, error)

func (*SummaryDomainReqType) UnmarshalJSON

func (c *SummaryDomainReqType) UnmarshalJSON(b []byte) error

func (SummaryDomainReqType) Value added in v0.0.90

func (c SummaryDomainReqType) Value() int32

type SummaryDomainReqTypeEnum

type SummaryDomainReqTypeEnum struct {
	E_0 SummaryDomainReqType
}

func GetSummaryDomainReqTypeEnum

func GetSummaryDomainReqTypeEnum() SummaryDomainReqTypeEnum

type SummaryReq

type SummaryReq struct {

	// 文本正文(目前仅支持UTF-8编码),长度不超过10000字。
	Content string `json:"content"`

	// 支持的文本语言类型,目前支持中文(zh)和英文(en),默认为中文。
	Lang *SummaryReqLang `json:"lang,omitempty"`

	// 生成摘要的长度限制。length_limit > 1,则返回结果为字数不小于该值且最接近该值的摘要。 0 <= length_limit <= 1,则返回结果为长度百分比不小于该值且最接近该值的摘要。 默认数值为0.3。
	LengthLimit *float32 `json:"length_limit,omitempty"`

	// 文本标题(目前仅支持UTF-8编码),长度不超过1000字。
	Title *string `json:"title,omitempty"`
}

func (SummaryReq) String

func (o SummaryReq) String() string

type SummaryReqLang

type SummaryReqLang struct {
	// contains filtered or unexported fields
}

func (SummaryReqLang) MarshalJSON

func (c SummaryReqLang) MarshalJSON() ([]byte, error)

func (*SummaryReqLang) UnmarshalJSON

func (c *SummaryReqLang) UnmarshalJSON(b []byte) error

func (SummaryReqLang) Value added in v0.0.90

func (c SummaryReqLang) Value() string

type SummaryReqLangEnum

type SummaryReqLangEnum struct {
	ZH SummaryReqLang
	EN SummaryReqLang
}

func GetSummaryReqLangEnum

func GetSummaryReqLangEnum() SummaryReqLangEnum

type TextSimilarityAdvanceRequest

type TextSimilarityAdvanceRequest struct {

	// 待计算文本1,长度1~512,文本编码为UTF-8。
	Text1 string `json:"text1"`

	// 待计算文本1,长度1~512,文本编码为UTF-8。
	Text2 string `json:"text2"`

	// 支持的文本语言类型,目前只支持中文(zh),默认为中文。
	Lang *TextSimilarityAdvanceRequestLang `json:"lang,omitempty"`
}

文本相似度请求体

func (TextSimilarityAdvanceRequest) String

type TextSimilarityAdvanceRequestLang

type TextSimilarityAdvanceRequestLang struct {
	// contains filtered or unexported fields
}

func (TextSimilarityAdvanceRequestLang) MarshalJSON

func (c TextSimilarityAdvanceRequestLang) MarshalJSON() ([]byte, error)

func (*TextSimilarityAdvanceRequestLang) UnmarshalJSON

func (c *TextSimilarityAdvanceRequestLang) UnmarshalJSON(b []byte) error

func (TextSimilarityAdvanceRequestLang) Value added in v0.0.90

type TextSimilarityAdvanceRequestLangEnum

type TextSimilarityAdvanceRequestLangEnum struct {
	ZH TextSimilarityAdvanceRequestLang
}

func GetTextSimilarityAdvanceRequestLangEnum

func GetTextSimilarityAdvanceRequestLangEnum() TextSimilarityAdvanceRequestLangEnum

type TextSimilarityRequest

type TextSimilarityRequest struct {

	// 待计算文本1,中文长度1~512,英文长度1~2000,文本编码为UTF-8。
	Text1 string `json:"text1"`

	// 待计算文本2,中文长度1~512,英文长度1~2000,文本编码为UTF-8。
	Text2 string `json:"text2"`

	// 支持的文本语言类型,目前支持中文(zh)和英文(en),默认为中文。
	Lang *TextSimilarityRequestLang `json:"lang,omitempty"`
}

文本相似度请求体

func (TextSimilarityRequest) String

func (o TextSimilarityRequest) String() string

type TextSimilarityRequestLang

type TextSimilarityRequestLang struct {
	// contains filtered or unexported fields
}

func (TextSimilarityRequestLang) MarshalJSON

func (c TextSimilarityRequestLang) MarshalJSON() ([]byte, error)

func (*TextSimilarityRequestLang) UnmarshalJSON

func (c *TextSimilarityRequestLang) UnmarshalJSON(b []byte) error

func (TextSimilarityRequestLang) Value added in v0.0.90

type TextSimilarityRequestLangEnum

type TextSimilarityRequestLangEnum struct {
	ZH TextSimilarityRequestLang
	EN TextSimilarityRequestLang
}

func GetTextSimilarityRequestLangEnum

func GetTextSimilarityRequestLangEnum() TextSimilarityRequestLangEnum

type TextTranslationReq

type TextTranslationReq struct {

	// 待翻译文本,仅支持utf-8编码,长度不超过2000字符。
	Text string `json:"text"`

	// 翻译原语言,具体取值见支持的语言列表: 阿拉伯语 ar 德语 de 俄语 ru 法语 fr 韩语 ko 葡萄牙语 pt 日语 ja 泰语 th 土耳其语 tr 西班牙语 es 英语 en 越南语 vi 中文(简体) zh 中文(繁体) zh-tw 自动检测输入语种并翻译成目标语种,您需要指定目标语种。 auto
	From TextTranslationReqFrom `json:"from"`

	// 翻译目标语言,具体取值见支持的语言列表: 阿拉伯语 ar 德语 de 俄语 ru 法语 fr 韩语 ko 葡萄牙语 pt 日语 ja 泰语 th 土耳其语 tr 西班牙语 es 英语 en 越南语 vi 中文(简体) zh 中文(繁体) zh-tw
	To TextTranslationReqTo `json:"to"`

	// 默认为“common”,当前只有通用场景
	Scene *TextTranslationReqScene `json:"scene,omitempty"`
}

This is a auto create Body Object

func (TextTranslationReq) String

func (o TextTranslationReq) String() string

type TextTranslationReqFrom

type TextTranslationReqFrom struct {
	// contains filtered or unexported fields
}

func (TextTranslationReqFrom) MarshalJSON

func (c TextTranslationReqFrom) MarshalJSON() ([]byte, error)

func (*TextTranslationReqFrom) UnmarshalJSON

func (c *TextTranslationReqFrom) UnmarshalJSON(b []byte) error

func (TextTranslationReqFrom) Value added in v0.0.90

func (c TextTranslationReqFrom) Value() string

type TextTranslationReqFromEnum

type TextTranslationReqFromEnum struct {
	ZH    TextTranslationReqFrom
	EN    TextTranslationReqFrom
	JA    TextTranslationReqFrom
	RU    TextTranslationReqFrom
	ES    TextTranslationReqFrom
	DE    TextTranslationReqFrom
	AR    TextTranslationReqFrom
	PT    TextTranslationReqFrom
	TH    TextTranslationReqFrom
	TR    TextTranslationReqFrom
	KO    TextTranslationReqFrom
	FR    TextTranslationReqFrom
	VI    TextTranslationReqFrom
	HI    TextTranslationReqFrom
	KM    TextTranslationReqFrom
	MY    TextTranslationReqFrom
	TA    TextTranslationReqFrom
	FA    TextTranslationReqFrom
	UR    TextTranslationReqFrom
	BN    TextTranslationReqFrom
	MR    TextTranslationReqFrom
	GU    TextTranslationReqFrom
	PA    TextTranslationReqFrom
	TE    TextTranslationReqFrom
	HE    TextTranslationReqFrom
	CS    TextTranslationReqFrom
	SK    TextTranslationReqFrom
	RO    TextTranslationReqFrom
	SQ    TextTranslationReqFrom
	LV    TextTranslationReqFrom
	ET    TextTranslationReqFrom
	LT    TextTranslationReqFrom
	HR    TextTranslationReqFrom
	BS    TextTranslationReqFrom
	KA    TextTranslationReqFrom
	SL    TextTranslationReqFrom
	CA    TextTranslationReqFrom
	AF    TextTranslationReqFrom
	MG    TextTranslationReqFrom
	ID    TextTranslationReqFrom
	FIL   TextTranslationReqFrom
	SW    TextTranslationReqFrom
	HU    TextTranslationReqFrom
	SR    TextTranslationReqFrom
	MK    TextTranslationReqFrom
	UK    TextTranslationReqFrom
	BG    TextTranslationReqFrom
	MT    TextTranslationReqFrom
	EL    TextTranslationReqFrom
	IS    TextTranslationReqFrom
	GA    TextTranslationReqFrom
	CY    TextTranslationReqFrom
	HT    TextTranslationReqFrom
	NO    TextTranslationReqFrom
	SV    TextTranslationReqFrom
	FI    TextTranslationReqFrom
	DA    TextTranslationReqFrom
	ZH_TW TextTranslationReqFrom
	AUTO  TextTranslationReqFrom
}

func GetTextTranslationReqFromEnum

func GetTextTranslationReqFromEnum() TextTranslationReqFromEnum

type TextTranslationReqScene

type TextTranslationReqScene struct {
	// contains filtered or unexported fields
}

func (TextTranslationReqScene) MarshalJSON

func (c TextTranslationReqScene) MarshalJSON() ([]byte, error)

func (*TextTranslationReqScene) UnmarshalJSON

func (c *TextTranslationReqScene) UnmarshalJSON(b []byte) error

func (TextTranslationReqScene) Value added in v0.0.90

func (c TextTranslationReqScene) Value() string

type TextTranslationReqSceneEnum

type TextTranslationReqSceneEnum struct {
	COMMON TextTranslationReqScene
}

func GetTextTranslationReqSceneEnum

func GetTextTranslationReqSceneEnum() TextTranslationReqSceneEnum

type TextTranslationReqTo

type TextTranslationReqTo struct {
	// contains filtered or unexported fields
}

func (TextTranslationReqTo) MarshalJSON

func (c TextTranslationReqTo) MarshalJSON() ([]byte, error)

func (*TextTranslationReqTo) UnmarshalJSON

func (c *TextTranslationReqTo) UnmarshalJSON(b []byte) error

func (TextTranslationReqTo) Value added in v0.0.90

func (c TextTranslationReqTo) Value() string

type TextTranslationReqToEnum

func GetTextTranslationReqToEnum

func GetTextTranslationReqToEnum() TextTranslationReqToEnum

type Word

type Word struct {

	// 词汇文本。
	Content string `json:"content"`

	// 词汇对应的词性。
	Pos string `json:"pos"`
}

词汇类

func (Word) String

func (o Word) String() string

Source Files

Jump to

Keyboard shortcuts

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