Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Source sets target source. Source = func(source string) Option { return func(c *config) { c.source = source } } // Query sets CSS query for the target. Query = func(query string) Option { return func(c *config) { c.query = query } } // TargetType sets content type of the target. TargetType = func(contentType ContentType) Option { return func(c *config) { c.contentType = contentType } } // Limit sets cthe limit of tags for the target. Limit = func(limit int) Option { return func(c *config) { c.limit = limit } } // Verbose enables high verbosity. Verbose = func(verbose bool) Option { return func(c *config) { c.verbose = verbose } } // NoStopWords enables stop-words exclusion from the output. NoStopWords = func(noStopWords bool) Option { return func(c *config) { c.noStopWords = noStopWords } } )
Functions ¶
func GetTagsFromString ¶ added in v0.1.0
func GetTagsFromString(input string, contentType ContentType, limit int, verbose, noStopWords bool) ([]*processor.Tag, error)
GetTagsFromString produces slice of tags ordered by frequency and limited by limit.
Types ¶
type ContentType ¶ added in v0.2.0
type ContentType byte
ContentType ...
const ( Unknown ContentType = iota Text HTML )
Content types
func ContentTypeOf ¶ added in v0.2.0
func ContentTypeOf(contentType string) ContentType
ContentTypeOf returns ContentType based on string value.
func (ContentType) String ¶ added in v0.2.0
func (contentType ContentType) String() string
String ...
Click to show internal directories.
Click to hide internal directories.