models

package
v0.0.0-...-cf7c0d1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2015 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLASS_PERSON = 0 << iota
	CLASS_ORGANIZATION
	CLASS_PLACE
	CLASS_STOPWORD

	ROLE_SUBJECT = 0 << iota
	ROLE_ACTION
	ROLE_OBJECT
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentEntity

type DocumentEntity struct {
	Status      string
	Url         string `param:"url"`
	Title       string `param:"title"`
	Description string `param:"description"`
	Keywords    string `param:"keywords"`
	Content     string `param:"content"`
	TopImage    string
	Language    string   `param:"lang"`
	Flags       []string `param:flags`

	Unknown  map[string]int64
	Entities *list.List
	// contains filtered or unexported fields
}

func NewDocumentEntity

func NewDocumentEntity() *DocumentEntity

func (*DocumentEntity) AddSentenceEntity

func (this *DocumentEntity) AddSentenceEntity(se *SentenceEntity)

func (*DocumentEntity) AddUnknownEntity

func (this *DocumentEntity) AddUnknownEntity(name string, frequency int64)

func (*DocumentEntity) Init

func (this *DocumentEntity) Init()

func (*DocumentEntity) Sentences

func (this *DocumentEntity) Sentences() *list.List

func (*DocumentEntity) SetSentences

func (this *DocumentEntity) SetSentences(lss *list.List)

func (*DocumentEntity) SexpString

func (this *DocumentEntity) SexpString() string

func (*DocumentEntity) String

func (this *DocumentEntity) String() string

func (*DocumentEntity) ToJSON

func (this *DocumentEntity) ToJSON() interface{}

type Entity

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

func NewEntity

func NewEntity(model string, score float64, value string) *Entity

func (*Entity) GetValue

func (this *Entity) GetValue() string

func (*Entity) String

func (this *Entity) String() string

func (*Entity) ToJSON

func (this *Entity) ToJSON() interface{}

type SentenceEntity

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

func NewSentenceEntity

func NewSentenceEntity() *SentenceEntity

func (*SentenceEntity) AddTokenEntity

func (this *SentenceEntity) AddTokenEntity(te *TokenEntity)

func (*SentenceEntity) GetSentence

func (this *SentenceEntity) GetSentence() interface{}

func (*SentenceEntity) SetBody

func (this *SentenceEntity) SetBody(body string)

func (*SentenceEntity) SetSentence

func (this *SentenceEntity) SetSentence(sentence interface{})

func (*SentenceEntity) ToJSON

func (this *SentenceEntity) ToJSON() interface{}

type TokenEntity

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

func NewTokenEntity

func NewTokenEntity(base string, lemma string, pos string, prob float64) *TokenEntity

func (*TokenEntity) ToJSON

func (this *TokenEntity) ToJSON() interface{}

type UnknownEntity

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

func NewUnknownEntity

func NewUnknownEntity(name string, frequency int64) *UnknownEntity

func (*UnknownEntity) ToJSON

func (this *UnknownEntity) ToJSON() interface{}

Jump to

Keyboard shortcuts

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