Documentation ¶
Index ¶
- Constants
- type CollectConfig
- type JsonTextPart
- type ReadMode
- type TermFilter
- func (t *TermFilter) IncludeFirst() bool
- func (t *TermFilter) IncludeLast() bool
- func (filter *TermFilter) MatchesLexeme(v *lexemes.Lexeme) bool
- func (filter *TermFilter) MatchesStats(v *TermStat) bool
- func (t *TermFilter) Minlen() int
- func (t *TermFilter) ReverseFreq() bool
- func (t *TermFilter) ToDto() TermFilterDto
- type TermFilterDto
- type TermFilterOptions
- type TermStat
- func (l *TermStat) Count() int
- func (l *TermStat) FirstCount() int
- func (l *TermStat) FirstIndex() int
- func (l *TermStat) FirstPart() int
- func (l *TermStat) GetSortIndex() int64
- func (l *TermStat) LastCount() int
- func (l *TermStat) Len() int
- func (l *TermStat) Merge(other *TermStat) *TermStat
- func (l *TermStat) Register(lexeme *lexemes.Lexeme, part int, idx int)
- func (t *TermStat) ToDto() TermStatDto
- func (l *TermStat) Value() string
- type TermStatCollection
- func (c *TermStatCollection) Add(lexeme *lexemes.Lexeme, part int, idx int)
- func (c *TermStatCollection) AddError(e error)
- func (c *TermStatCollection) AddErrors(e []error)
- func (c *TermStatCollection) DocOrderIndex() []*TermStat
- func (c *TermStatCollection) Errors() []error
- func (c *TermStatCollection) Find(size int, filter *TermFilter) []*TermStat
- func (c *TermStatCollection) FreqOrderIndex() []*TermStat
- func (c *TermStatCollection) Get(word string) *TermStat
- func (c *TermStatCollection) IsIndexReady() bool
- func (c *TermStatCollection) Merge(other *TermStatCollection) *TermStatCollection
- func (c *TermStatCollection) RebuildFrequencyIndex()
- func (c *TermStatCollection) Terms() map[string]*TermStat
- type TermStatConfig
- type TermStatDto
- type TermStatQuery
Constants ¶
View Source
const ( MODE_PLAIN = ReadMode(1) MODE_JSON = ReadMode(2) MODE_PARALLEL_JSON = ReadMode(4) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectConfig ¶
type CollectConfig struct { Filter *TermFilter Part int Mode ReadMode Workers int }
type JsonTextPart ¶
type JsonTextPart struct { Number int Text string // при работе с горутинами и каналами надо как-то // более корректно действовать с ошибками Error error }
func NewErrorPart ¶
func NewErrorPart(err error) *JsonTextPart
type TermFilter ¶
type TermFilter struct {
// contains filtered or unexported fields
}
func NewTermFilter ¶
func NewTermFilter(opts TermFilterOptions) *TermFilter
func NewTermFilterArgs
deprecated
func NewTermFilterArgs(minlen int, includeFirst bool, includeLast bool, reverseFreq bool) *TermFilter
Deprecated: NewTermFilterArgs
func (*TermFilter) IncludeFirst ¶
func (t *TermFilter) IncludeFirst() bool
func (*TermFilter) IncludeLast ¶
func (t *TermFilter) IncludeLast() bool
func (*TermFilter) MatchesLexeme ¶
func (filter *TermFilter) MatchesLexeme(v *lexemes.Lexeme) bool
func (*TermFilter) MatchesStats ¶
func (filter *TermFilter) MatchesStats(v *TermStat) bool
func (*TermFilter) Minlen ¶
func (t *TermFilter) Minlen() int
func (*TermFilter) ReverseFreq ¶
func (t *TermFilter) ReverseFreq() bool
func (*TermFilter) ToDto ¶
func (t *TermFilter) ToDto() TermFilterDto
type TermFilterDto ¶
type TermFilterOptions ¶
type TermStat ¶
type TermStat struct {
// contains filtered or unexported fields
}
func NewTermStat ¶
func NewTermStatCustom ¶
func NewTermStatCustom(config TermStatConfig) *TermStat
func (*TermStat) FirstCount ¶
func (*TermStat) FirstIndex ¶
func (*TermStat) GetSortIndex ¶
GetSortIndex - формирует синтетический порядковый номер для сквозного упорядочения число само по себе не является обозначение позиции
func (*TermStat) ToDto ¶
func (t *TermStat) ToDto() TermStatDto
type TermStatCollection ¶
type TermStatCollection struct {
// contains filtered or unexported fields
}
func CollectFromReader ¶
func CollectFromReader(reader io.Reader, config CollectConfig) *TermStatCollection
func CollectFromString ¶
func CollectFromString(text string, config CollectConfig) *TermStatCollection
func NewTermStatCollection ¶
func NewTermStatCollection() *TermStatCollection
func NewTermStatCollectionF ¶
func NewTermStatCollectionF(filter *TermFilter) *TermStatCollection
func (*TermStatCollection) Add ¶
func (c *TermStatCollection) Add(lexeme *lexemes.Lexeme, part int, idx int)
func (*TermStatCollection) AddError ¶
func (c *TermStatCollection) AddError(e error)
func (*TermStatCollection) AddErrors ¶
func (c *TermStatCollection) AddErrors(e []error)
func (*TermStatCollection) DocOrderIndex ¶
func (c *TermStatCollection) DocOrderIndex() []*TermStat
func (*TermStatCollection) Errors ¶
func (c *TermStatCollection) Errors() []error
func (*TermStatCollection) Find ¶
func (c *TermStatCollection) Find(size int, filter *TermFilter) []*TermStat
func (*TermStatCollection) FreqOrderIndex ¶
func (c *TermStatCollection) FreqOrderIndex() []*TermStat
func (*TermStatCollection) Get ¶
func (c *TermStatCollection) Get(word string) *TermStat
func (*TermStatCollection) IsIndexReady ¶
func (c *TermStatCollection) IsIndexReady() bool
func (*TermStatCollection) Merge ¶
func (c *TermStatCollection) Merge(other *TermStatCollection) *TermStatCollection
func (*TermStatCollection) RebuildFrequencyIndex ¶
func (c *TermStatCollection) RebuildFrequencyIndex()
func (*TermStatCollection) Terms ¶
func (c *TermStatCollection) Terms() map[string]*TermStat
type TermStatConfig ¶
type TermStatDto ¶
Click to show internal directories.
Click to hide internal directories.