tempo_eval.extract_tags

tempo_eval.extract_tags(tag_annotations)[source]

Extract tags from annotations object as set.

Parameters

tag_annotations (Annotation) – annotations

Returns

set of tags

Return type

set[str]

Example

>>> from tempo_eval import read_reference_annotations, extract_tags
# choose namespace 'tag_gtzan'!
>>> gtzan = read_reference_annotations('gtzan', namespace='tag_gtzan', validate=False)
>>> gtzan_hh_691694 = gtzan['tag_gtzan']['1.0']['hiphop.00086.jams']
>>> tags = extract_tags(gtzan_hh_691694)
>>> print(tags)
{'hip-hop'}