Documentation ¶
Overview ¶
export two method
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BaiduTranslater BaiduTranslate QueryChan chan string //独立的 query MergeQueryChan chan string //合并后的 query )
Functions ¶
This section is empty.
Types ¶
type BaiDuTranslateResule ¶
type BaiDuTranslateResule struct { From string `json:"from"` To string `json:"to"` Trans_result []FanyiResult `json:"trans_result"` Error_code string `json:"error_code"` Error_msg string `json:"error_msg"` }
type BaiduTransEnToZh ¶
type BaiduTranslate ¶
func NewBaiduTranslater ¶
func NewBaiduTranslater(Appid, Secret string, setmeal SetMeal, lang Lang) *BaiduTranslate
func (*BaiduTranslate) Translate ¶
func (c *BaiduTranslate) Translate(querys []string) []string
translate mulit word, rsync filter \n
func (*BaiduTranslate) TranslateOne ¶
func (c *BaiduTranslate) TranslateOne(query string) string
translate One query
type FanyiResult ¶
Click to show internal directories.
Click to hide internal directories.