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, []byte)
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.
type Meta ¶ added in v0.29.0
type Meta struct { ContentType ContentType DocTitle string DocVersion string }
Meta extra information.
type Result ¶ added in v0.29.0
Result represents result of Tagify.
func (*Result) TagsStrings ¶ added in v0.29.0
TagsStrings transforms slice of tags into a slice of strings.
Click to show internal directories.
Click to hide internal directories.