

tag_names = [db_magnaclips.tagdb.lexicon];
for i = 1:numel(tag_names)
    tag_names2(i,[2 1]) = {tag_names{i}, i};
end
CELL2CSV('tag_names.csv',tag_names2, ',') ;

for i = 1:numel(u)
    file_names(i,1:2) = {u(i), db_magnaclips.annots_filenames{i,2}};
end
CELL2CSV('file_names.csv',file_names, ',') ;

for i = 1:numel(clips)
    clip_tags(i,1:2) = {u(i), implode(', ', clips(i).tag_ids)};
end
CELL2CSV('clip_tags.csv',clip_tags, ';') ;