Create tags / keywords from text

Hi there,

I am trying to figuring out if it’s possible to implement the functionality with huggingface to create tags of a corpus for each individual text.

E.g. I have a corpus with AI related news and the model will be able to categorize the single articles into “NLP”, “Vision”, etc. where it comes up with the tags by itself and the number of tags are dynamic depending on the content.

Is this feasible somehow?

Thanks in advance,



I feel like what you’re looking for is zero shot classification for the number of tags that are dynamic depending on the content, or multi-label text classification. Another thing you can do is to fine-tune BERT for multi-label text classification if you already have annotated data.

1 Like