Documentation
¶
Index ¶
Constants ¶
View Source
const ( RU = "rus" ENG = "eng" ARA = "ara" DUT = "dut" HEB = "heb" SPA = "spa" ITA = "ita" CHI = "chi" KOR = "kor" GER = "ger" POL = "pol" POR = "por" RUM = "rum" TUR = "tur" UKR = "urk" FRA = "fra" SWE = "swe" JPN = "jpn" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextResult ¶
type LanguageDetection ¶
type LanguageDetection struct { DetectedLanguage string `json:"detectedLanguage"` IsDirectionChanged bool `json:"isDirectionChanged"` OriginalDirection string `json:"originalDirection"` OriginalDirectionContextMatches int `json:"originalDirectionContextMatches"` ChangedDirectionContextMatches int `json:"changedDirectionContextMatches"` TimeTaken int `json:"timeTaken"` }
type Result ¶
type Result struct { Translation string `json:"translation"` SourceExamples []string `json:"sourceExamples"` TargetExamples []string `json:"targetExamples"` Rude bool `json:"rude"` Colloquial bool `json:"colloquial"` PartOfSpeech interface{} `json:"partOfSpeech"` Frequency int `json:"frequency"` Vowels interface{} `json:"vowels"` Transliteration interface{} `json:"transliteration"` }
type ReversoApi ¶
type ReversoApi struct {
Translation TranslateInterface
}
func NewReversoApi ¶
func NewReversoApi() *ReversoApi
type TranslateInterface ¶
type TranslateInterface interface {
Translate(request *TranslationRequest) (*TranslationResponse, error)
}
type TranslationRequest ¶
type TranslationResponse ¶
type TranslationResponse struct { Id string `json:"id"` From string `json:"from"` To string `json:"to"` Input []string `json:"input"` CorrectedText string `json:"correctedText"` Translation []string `json:"translation"` Engines []string `json:"engines"` LanguageDetection LanguageDetection `json:"language_detection"` ContextResults ContextResult `json:"contextResults"` Truncated bool `json:"truncated"` TimeTaken int `json:"timeTaken"` }
Click to show internal directories.
Click to hide internal directories.