backend_particular

package
Version: v0.0.0-...-9044698 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Copyright 2015 Home24 AG. All rights reserved. Proprietary license.

Copyright 2016 Home24 AG. All rights reserved. Proprietary license.

Copyright 2016 Home24 AG. All rights reserved. Proprietary license.

Copyright 2015 Home24 AG. All rights reserved. Proprietary license.

Copyright 2016 Home24 AG. All rights reserved. Proprietary license.

Copyright 2015 Home24 AG. All rights reserved. Proprietary license.

Index

Constants

View Source
const LG_PART_URL = "http://www.lingvolive.com/api/Translation/WordListPart/" //Fucking slow
View Source
const LG_URL = "http://www.lingvolive.com/api/Translation/Translate/"
View Source
const MT_URL = "http://www.multitran.ru/c/m.exe"
View Source
const UD_URL = "http://api.urbandictionary.com/v0/define?term=%s"
View Source
const YA_DICT_URL = "https://dictionary.yandex.net/api/v1/dicservice.json/lookup"

Variables

This section is empty.

Functions

This section is empty.

Types

type AbbyyLingvoLiveTranslator

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

func (*AbbyyLingvoLiveTranslator) GetName

func (t *AbbyyLingvoLiveTranslator) GetName() string

func (*AbbyyLingvoLiveTranslator) TranslateWord

func (t *AbbyyLingvoLiveTranslator) TranslateWord(text string, language, to string) IBackendParticularResponse

type IBackendParticular

type IBackendParticular interface {
	TranslateWord(text string, language, to string) (data IBackendParticularResponse)
	GetName() string
}

func NewAbbyyLingvoLiveTranslator

func NewAbbyyLingvoLiveTranslator(c *http.Client) IBackendParticular

func NewMultitran

func NewMultitran(c *http.Client) IBackendParticular

func NewYandexDict

func NewYandexDict(c *http.Client, key string) IBackendParticular

type IBackendParticularResponse

type IBackendParticularResponse interface {
	GetMeanings() []IParticularMeaning
	GetUrl() string
}

type IParticularMeaning

type IParticularMeaning interface {
	GetDictionary() string
	GetText() string
	GetAll() []string
}

type LingvoLiveTranslatorResponseFull

type LingvoLiveTranslatorResponseFull struct {
	Lang                  string
	Url                   string
	GlossaryUnits         interface{} `json:"glossaryUnits"`
	LanguagesReversed     bool        `json:"languagesReversed"`
	SeeAlsoWordForms      []string    `json:"seeAlsoWordForms"`
	Suggests              interface{} `json:"suggests"`
	WordByWordTranslation interface{} `json:"wordByWordTranslation"`
	Articles              []struct {
		Heading    string `json:"heading"`
		Dictionary string `json:"dictionary"`
		BodyHtml   string `json:"bodyHtml"`
	} `json:"lingvoArticles"`
}

func (*LingvoLiveTranslatorResponseFull) GetMeanings

func (*LingvoLiveTranslatorResponseFull) GetUrl

type LingvoLiveTranslatorResponsePart

type LingvoLiveTranslatorResponsePart struct {
	Lang string

	Items []struct {
		Heading      string `json:"heading"`
		Dictationary string `json:"lingvoDictionaryName"`
		Translations string `json:"lingvoTranslations"`
	} `json:"items"`
}

type Meaning

type Meaning struct {
	Dictionary string
	Text       string
	All        []string
}

func (*Meaning) GetAll

func (m *Meaning) GetAll() []string

func (*Meaning) GetDictionary

func (m *Meaning) GetDictionary() string

func (*Meaning) GetText

func (m *Meaning) GetText() string

type Multitran

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

func (*Multitran) GetName

func (t *Multitran) GetName() string

func (*Multitran) TranslateWord

func (t *Multitran) TranslateWord(text string, language, to string) IBackendParticularResponse

type MultitranResponse

type MultitranResponse struct {
	HtmlBytes []byte
	Lang      string
	Url       string
}

func (*MultitranResponse) GetMeanings

func (t *MultitranResponse) GetMeanings() []IParticularMeaning

func (*MultitranResponse) GetUrl

func (t *MultitranResponse) GetUrl() string

type YandexDict

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

func (*YandexDict) GetName

func (t *YandexDict) GetName() string

func (*YandexDict) TranslateWord

func (t *YandexDict) TranslateWord(text string, language, to string) IBackendParticularResponse

type YandexDictResponse

type YandexDictResponse struct {
	Lang string
	Url  string
	Def  []*YandexDictResponseItem `json:"def"`
}

func (*YandexDictResponse) GetMeanings

func (t *YandexDictResponse) GetMeanings() []IParticularMeaning

func (*YandexDictResponse) GetUrl

func (t *YandexDictResponse) GetUrl() string

type YandexDictResponseItem

type YandexDictResponseItem struct {
	Text string                    `json:"text"`
	Num  string                    `json:"pos"`
	Def  []*YandexDictResponseItem `json:"def"`
	Tr   []*YandexDictResponseItem `json:"tr"`
	Syn  []*YandexDictResponseItem `json:"syn"`
	Mean []*YandexDictResponseItem `json:"mean"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL