Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InputReader ¶
type InputReader interface { ReadLines() ([]string, error) io.ReadCloser }
InputReader ...
type Meta ¶
type Meta struct { ContentType config.ContentType DocTitle string DocHash string Lang string Screenshot []byte // bytes of the viewport screenshot in png }
Meta extra information.
type ProcessFunc ¶ added in v0.56.0
type ProcessFunc func(c *config.Config, reader io.ReadCloser) *Result
ProcessFunc represents an arbitrary handler, which goes through given reader and produces tags.
type Result ¶
type Result struct { Meta *Meta RawTags map[string]*Tag Tags []*Tag // processed slice of the result dictionary - RawTags Extensions map[string]map[string]*extension.ExtResult Err error }
Result represents result of Tagify.
func EmptyResult ¶
func EmptyResult() *Result
func (*Result) FindExtResults ¶
FindExtResults finds requested extension result(s), in case if version is empty.
func (*Result) ForEach ¶
ForEach iterates through the slice of Tags and calls provided "fn" on every iteration.
func (*Result) TagsStrings ¶
TagsStrings returns slice of strings representing tags.
type Tag ¶
type Tag struct { // Value of the tag, i.e. a word Value string // Score used to represent importance of the tag Score float64 // Count is the number of times tag appeared in a text Count int // Docs is the number of documents in a text in which the tag appeared Docs int // DocsCount is the number of documents in a text DocsCount int }
Tag holds some arbitrary string value (e.g. a word) along with some extra data about it.
Click to show internal directories.
Click to hide internal directories.