common

package
v0.0.0-...-ce5e274 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBC2SBC

func DBC2SBC(s string) string

半角->全角 Translation: "half width to full width"

func If

func If(condition bool, trueVal, falseVal interface{}) interface{}

func Max

func Max(first int, args ...int) int

func Min

func Min(first int, args ...int) int

func SBC2DBC

func SBC2DBC(s string) string

全角->半角 Translation: "full width to half width"

Types

type ArrayDoc2VecStringProvider

type ArrayDoc2VecStringProvider struct {
	Data []IDoc2VecWord
	Cur  int
}

func NewDoc2VecArrayStringProvider

func NewDoc2VecArrayStringProvider(data []IDoc2VecWord) *ArrayDoc2VecStringProvider

func (*ArrayDoc2VecStringProvider) More

func (a *ArrayDoc2VecStringProvider) More() bool

func (*ArrayDoc2VecStringProvider) Next

type ArrayStringProvider

type ArrayStringProvider struct {
	Data []string
	Cur  int
}

func NewArrayStringProvider

func NewArrayStringProvider(data []string) *ArrayStringProvider

func (*ArrayStringProvider) More

func (a *ArrayStringProvider) More() bool

func (*ArrayStringProvider) Next

func (a *ArrayStringProvider) Next() string

type EndpointData

type EndpointData struct {
	TheName string
	//TheWords *ArrayStringProvider
	TheWords IStringProvider
}

func (*EndpointData) Name

func (e *EndpointData) Name() string

func (*EndpointData) Words

func (e *EndpointData) Words() IStringProvider

type IDoc2VecWord

type IDoc2VecWord interface {
	Make() string
}

IDoc2VecWord is the interface used to construct a word for the Doc2Vec algorithm. Anything meeting this interface can supply data to Doc2Vec

type IEndpointData

type IEndpointData interface {
	Name() string
	Words() IStringProvider
}

type IModelDataProvider

type IModelDataProvider interface {
	More() bool
	Next() IEndpointData
	Reset()
}

type IResettableReader

type IResettableReader interface {
	io.Reader
	io.Seeker
}

type IStringProvider

type IStringProvider interface {
	More() bool
	Next() string
}

type ModelFileDataProvider

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

func NewModelFileDataProvider

func NewModelFileDataProvider(reader IResettableReader) *ModelFileDataProvider

func NewModelFileDataProvider(reader io.Reader) *ModelFileDataProvider {

func (*ModelFileDataProvider) More

func (m *ModelFileDataProvider) More() bool

func (*ModelFileDataProvider) Next

func (*ModelFileDataProvider) Reset

func (m *ModelFileDataProvider) Reset()

Jump to

Keyboard shortcuts

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