Documentation ¶
Index ¶
- type DetectTextPathReqBodyBuilder
- type DetectTextReq
- type DetectTextReqBody
- type DetectTextReqBodyBuilder
- type DetectTextReqBuilder
- type DetectTextResp
- type DetectTextRespData
- type Term
- type TermBuilder
- type Text
- type TranslateTextPathReqBodyBuilder
- func (builder *TranslateTextPathReqBodyBuilder) Build() (*TranslateTextReqBody, error)
- func (builder *TranslateTextPathReqBodyBuilder) Glossary(glossary []*Term) *TranslateTextPathReqBodyBuilder
- func (builder *TranslateTextPathReqBodyBuilder) SourceLanguage(sourceLanguage string) *TranslateTextPathReqBodyBuilder
- func (builder *TranslateTextPathReqBodyBuilder) TargetLanguage(targetLanguage string) *TranslateTextPathReqBodyBuilder
- func (builder *TranslateTextPathReqBodyBuilder) Text(text string) *TranslateTextPathReqBodyBuilder
- type TranslateTextReq
- type TranslateTextReqBody
- type TranslateTextReqBodyBuilder
- func (builder *TranslateTextReqBodyBuilder) Build() *TranslateTextReqBody
- func (builder *TranslateTextReqBodyBuilder) Glossary(glossary []*Term) *TranslateTextReqBodyBuilder
- func (builder *TranslateTextReqBodyBuilder) SourceLanguage(sourceLanguage string) *TranslateTextReqBodyBuilder
- func (builder *TranslateTextReqBodyBuilder) TargetLanguage(targetLanguage string) *TranslateTextReqBodyBuilder
- func (builder *TranslateTextReqBodyBuilder) Text(text string) *TranslateTextReqBodyBuilder
- type TranslateTextReqBuilder
- type TranslateTextResp
- type TranslateTextRespData
- type TranslationService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetectTextPathReqBodyBuilder ¶
type DetectTextPathReqBodyBuilder struct {
// contains filtered or unexported fields
}
func NewDetectTextPathReqBodyBuilder ¶
func NewDetectTextPathReqBodyBuilder() *DetectTextPathReqBodyBuilder
func (*DetectTextPathReqBodyBuilder) Build ¶
func (builder *DetectTextPathReqBodyBuilder) Build() (*DetectTextReqBody, error)
func (*DetectTextPathReqBodyBuilder) Text ¶
func (builder *DetectTextPathReqBodyBuilder) Text(text string) *DetectTextPathReqBodyBuilder
需要被识别语种的文本
示例值:你好
type DetectTextReq ¶
type DetectTextReq struct { Body *DetectTextReqBody `body:""` // contains filtered or unexported fields }
type DetectTextReqBody ¶
type DetectTextReqBody struct {
Text *string `json:"text,omitempty"` // 需要被识别语种的文本
}
type DetectTextReqBodyBuilder ¶
type DetectTextReqBodyBuilder struct {
// contains filtered or unexported fields
}
func NewDetectTextReqBodyBuilder ¶
func NewDetectTextReqBodyBuilder() *DetectTextReqBodyBuilder
func (*DetectTextReqBodyBuilder) Build ¶
func (builder *DetectTextReqBodyBuilder) Build() *DetectTextReqBody
func (*DetectTextReqBodyBuilder) Text ¶
func (builder *DetectTextReqBodyBuilder) Text(text string) *DetectTextReqBodyBuilder
需要被识别语种的文本
示例值:你好
type DetectTextReqBuilder ¶
type DetectTextReqBuilder struct {
// contains filtered or unexported fields
}
func NewDetectTextReqBuilder ¶
func NewDetectTextReqBuilder() *DetectTextReqBuilder
func (*DetectTextReqBuilder) Body ¶
func (builder *DetectTextReqBuilder) Body(body *DetectTextReqBody) *DetectTextReqBuilder
机器翻译 (MT),支持 100 多种语言识别,返回符合 ISO 639-1 标准
func (*DetectTextReqBuilder) Build ¶
func (builder *DetectTextReqBuilder) Build() *DetectTextReq
type DetectTextResp ¶
type DetectTextResp struct { *larkcore.ApiResp `json:"-"` larkcore.CodeError Data *DetectTextRespData `json:"data"` // 业务数据 }
func (*DetectTextResp) Success ¶
func (resp *DetectTextResp) Success() bool
type DetectTextRespData ¶
type DetectTextRespData struct {
Language *string `json:"language,omitempty"` // 识别的文本语种,返回符合 ISO 639-1 标准
}
type TermBuilder ¶
type TermBuilder struct {
// contains filtered or unexported fields
}
func NewTermBuilder ¶
func NewTermBuilder() *TermBuilder
func (*TermBuilder) Build ¶
func (builder *TermBuilder) Build() *Term
type TranslateTextPathReqBodyBuilder ¶
type TranslateTextPathReqBodyBuilder struct {
// contains filtered or unexported fields
}
func NewTranslateTextPathReqBodyBuilder ¶
func NewTranslateTextPathReqBodyBuilder() *TranslateTextPathReqBodyBuilder
func (*TranslateTextPathReqBodyBuilder) Build ¶
func (builder *TranslateTextPathReqBodyBuilder) Build() (*TranslateTextReqBody, error)
func (*TranslateTextPathReqBodyBuilder) Glossary ¶
func (builder *TranslateTextPathReqBodyBuilder) Glossary(glossary []*Term) *TranslateTextPathReqBodyBuilder
请求级术语表,携带术语,仅在本次翻译中生效(最多能携带 128个术语词)
示例值:
func (*TranslateTextPathReqBodyBuilder) SourceLanguage ¶
func (builder *TranslateTextPathReqBodyBuilder) SourceLanguage(sourceLanguage string) *TranslateTextPathReqBodyBuilder
源语言
示例值:zh
func (*TranslateTextPathReqBodyBuilder) TargetLanguage ¶
func (builder *TranslateTextPathReqBodyBuilder) TargetLanguage(targetLanguage string) *TranslateTextPathReqBodyBuilder
目标语言
示例值:en
func (*TranslateTextPathReqBodyBuilder) Text ¶
func (builder *TranslateTextPathReqBodyBuilder) Text(text string) *TranslateTextPathReqBodyBuilder
源文本
示例值:尝试使用一下飞书吧
type TranslateTextReq ¶
type TranslateTextReq struct { Body *TranslateTextReqBody `body:""` // contains filtered or unexported fields }
type TranslateTextReqBody ¶
type TranslateTextReqBodyBuilder ¶
type TranslateTextReqBodyBuilder struct {
// contains filtered or unexported fields
}
func NewTranslateTextReqBodyBuilder ¶
func NewTranslateTextReqBodyBuilder() *TranslateTextReqBodyBuilder
func (*TranslateTextReqBodyBuilder) Build ¶
func (builder *TranslateTextReqBodyBuilder) Build() *TranslateTextReqBody
func (*TranslateTextReqBodyBuilder) Glossary ¶
func (builder *TranslateTextReqBodyBuilder) Glossary(glossary []*Term) *TranslateTextReqBodyBuilder
请求级术语表,携带术语,仅在本次翻译中生效(最多能携带 128个术语词)
示例值:
func (*TranslateTextReqBodyBuilder) SourceLanguage ¶
func (builder *TranslateTextReqBodyBuilder) SourceLanguage(sourceLanguage string) *TranslateTextReqBodyBuilder
源语言
示例值:zh
func (*TranslateTextReqBodyBuilder) TargetLanguage ¶
func (builder *TranslateTextReqBodyBuilder) TargetLanguage(targetLanguage string) *TranslateTextReqBodyBuilder
目标语言
示例值:en
func (*TranslateTextReqBodyBuilder) Text ¶
func (builder *TranslateTextReqBodyBuilder) Text(text string) *TranslateTextReqBodyBuilder
源文本
示例值:尝试使用一下飞书吧
type TranslateTextReqBuilder ¶
type TranslateTextReqBuilder struct {
// contains filtered or unexported fields
}
func NewTranslateTextReqBuilder ¶
func NewTranslateTextReqBuilder() *TranslateTextReqBuilder
func (*TranslateTextReqBuilder) Body ¶
func (builder *TranslateTextReqBuilder) Body(body *TranslateTextReqBody) *TranslateTextReqBuilder
机器翻译 (MT),支持以下语种互译:;"zh": 汉语;;"zh-Hant": 繁体汉语;;"en": 英语;;"ja": 日语;;"ru": 俄语;;"de": 德语;;"fr": 法语;;"it": 意大利语;;"pl": 波兰语;;"th": 泰语;;"hi": 印地语;;"id": 印尼语;;"es": 西班牙语;;"pt": 葡萄牙语;;"ko": 朝鲜语;;"vi": 越南语;
func (*TranslateTextReqBuilder) Build ¶
func (builder *TranslateTextReqBuilder) Build() *TranslateTextReq
type TranslateTextResp ¶
type TranslateTextResp struct { *larkcore.ApiResp `json:"-"` larkcore.CodeError Data *TranslateTextRespData `json:"data"` // 业务数据 }
func (*TranslateTextResp) Success ¶
func (resp *TranslateTextResp) Success() bool
type TranslateTextRespData ¶
type TranslateTextRespData struct {
Text *string `json:"text,omitempty"` // 翻译后的文本
}
type TranslationService ¶
type TranslationService struct { Text *text // 文本 // contains filtered or unexported fields }
func NewService ¶
func NewService(config *larkcore.Config) *TranslationService
Click to show internal directories.
Click to hide internal directories.