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

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

Go to latest
Published: May 25, 2016 License: MIT Imports: 8 Imported by: 2



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

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



This section is empty.


This section is empty.


func NewSegmentsSorter

func NewSegmentsSorter(m map[string]*RawTranslationData) *segmentSorter


type ParticularItem

type ParticularItem struct {
	Url          string
	Order        int
	Original     string
	Time         time.Duration
	Translations []backend_particular.IParticularMeaning

type RawParticularData

type RawParticularData struct {
	Original      string
	Source        string
	Lang          string
	Name          string
	ParticularBag []*ParticularItem
	Time          time.Duration

type RawTranslationData

type RawTranslationData struct {
	Source      string
	Lang        string
	Name        string
	Original    string
	Translation string
	Time        time.Duration
	Score       float64

RawTransData struct

type TranslateAdapter

type TranslateAdapter struct {
	// contains filtered or unexported fields

func NewTranslateAdapter

func NewTranslateAdapter(back []backend_full.IBackendFull, markov components.IChain) *TranslateAdapter

func (*TranslateAdapter) AppendUniEngine

func (t *TranslateAdapter) AppendUniEngine(container *TranslationContainer, segments []*processing.Segment)

func (*TranslateAdapter) CalculateRawTransData

func (t *TranslateAdapter) CalculateRawTransData(container *TranslationContainer)

func (*TranslateAdapter) CalculateScores

func (t *TranslateAdapter) CalculateScores(container *TranslationContainer, segments []*processing.Segment)

func (*TranslateAdapter) ChooseSegment

func (t *TranslateAdapter) ChooseSegment(engines map[string]*RawTranslationData) *RawTranslationData

func (*TranslateAdapter) GetSegmentTranslations

func (t *TranslateAdapter) GetSegmentTranslations(textSegments []*processing.Segment, languages []string) []map[string]map[string]*RawTranslationData

func (*TranslateAdapter) Translate

func (t *TranslateAdapter) Translate(text string, langs []string) *TranslationContainer

type TranslationBag

type TranslationBag map[string]string

TranslationBag hashmap

type TranslationContainer

type TranslationContainer struct {
	Langs        []string
	Translations TranslationBag
	Original     string
	Source       string
	//Meta              map[string]interface{}
	//RawTranslations   map[string]TranslationBag
	RawTransData    map[string]map[string]*RawTranslationData
	RawSegmentsData []map[string]map[string]*RawTranslationData //`json:"-"`

TranslationContainer struct

type Translator

type Translator interface {
	Translate(text string, languages []string) *TranslationContainer


Path Synopsis

Jump to

Keyboard shortcuts

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