pattern.predicate = const_cast<char*>(TAG);
pattern.object = 0;
pattern.object_type = lrdf_literal;
lrdf_statement* matches = lrdf_matches (&pattern);
pattern.predicate = const_cast<char*>(TAG);
pattern.object = 0;
pattern.object_type = lrdf_literal;
lrdf_statement* matches = lrdf_matches (&pattern);
lrdf_free_statements (matches);
sort (tags.begin(), tags.end());
lrdf_free_statements (matches);
sort (tags.begin(), tags.end());