wolffd@0: function [tags, tag_weight] = fm_retrieve_artist_tags(artist_name,bymbid) wolffd@0: %[tags, tag_weight] = fm_get_artist_tags(artist_name,bymbid) wolffd@0: % wolffd@0: % artist_name: either artist name string, or wolffd@0: % musicbrainz artist id with bymbid == 1 wolffd@0: % wolffd@0: % returns last.fm artist tags and tag weights for given artist wolffd@0: % this uses a lastpy python script to handle the REST data exchange wolffd@0: wolffd@0: if nargin < 2 wolffd@0: bymbid = '0'; wolffd@0: else wolffd@0: bymbid = num2str(bymbid); wolffd@0: end wolffd@0: wolffd@0: % call python function wolffd@0: tagstr = python('fm_retrieve_artist_tags.py',artist_name,bymbid); wolffd@0: wolffd@0: % parse text function output wolffd@0: tags = textscan(tagstr,'%s %d','Delimiter',','); wolffd@0: tag_weight = tags{2}; wolffd@0: tags = tags{1};