# Keywords and Lyrics¶

## Reference¶

class munin.provider.keywords.KeywordsProvider(compress=False)[source]

Splits an arbitary text into a list of keywordsets.

Each keywordset contains one more words that are considered to be repeated often or that are distinct in the text.

Takes: An arbitary text, or a one-element tuple with a string. Gives: A list of keywordsets, similar to the WordlistProvider.

Create a new Provider with the following attributes:

Parameters: compress – Deduplicate data?
class munin.provider.keywords.PlyrLyricsProvider(**kwargs)[source]

Retrieve a lyrics text from the web using libglyr.

Note

Many people have .lyrics files along their music files. This is not checked here, although libglyr is capable of that.

Takes: A tuple of (artist, title), outputs a one-element tuple with the lyrics text in it.

Example Usage:

>>> p = PlyrLyricsProvider()
>>> p.do_process(('Akrea', 'Trugbild'))
('lots of text', )


In the Mask it should be used as:

PlyrLyricsProvider() | KeywordsProvider()


Warning

If a artist/title combination is not found the result is remembered. If you do not want this behaviour set the cache_failures argument to False.

>>> PlyrLyricsProvider(cache_failures=False)


Note

When feeding tags from your music database as artist/title it is recommended to use the album_artist and the track_artist as fallback.

munin.provider.keywords.check_for_plyr()[source]

Returns True if the plyr lyrics provider is available