# Classification tweets by theme: How do i start?

**URL:** <https://discuss.huggingface.co/t/classification-tweets-by-theme-how-do-i-start/15278>\
**Category:** Beginners\
**Created:** [March 2, 2022, 7:52pm UTC](https://discuss.huggingface.co/t/classification-tweets-by-theme-how-do-i-start/15278 "2022-03-02T19:52:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![thelara](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@thelara](https://discuss.huggingface.co/u/thelara)\
**Post date:** [March 2, 2022, 7:52pm UTC](https://discuss.huggingface.co/t/classification-tweets-by-theme-how-do-i-start/15278/1 "2022-03-02T19:52:16Z")

</div>

I have a 7m dataset of tweets and would like to know if them are talking about these topics: Economy, Social, Environmental.

A tweet can talk about one topic, two topics, all topics, or none of them.

Can someone give me a starting point? What model should i use? Should i label some data or are there any other NLP approach better than using transformers?

---

<div class="post-metadata">

**Author:** ![anwarika](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@anwarika](https://discuss.huggingface.co/u/anwarika)\
**Post date:** [March 2, 2022, 7:55pm UTC](https://discuss.huggingface.co/t/classification-tweets-by-theme-how-do-i-start/15278/2 "2022-03-02T19:55:05Z")

</div>

Hi, I would use BERT to start off with. Do you have any data labeled? Here is a good starting point [here](https://github.com/abhimishra91/transformers-tutorials/blob/master/transformers_multi_label_classification.ipynb)

---

<div class="post-metadata">

**Author:** ![thelara](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@thelara](https://discuss.huggingface.co/u/thelara)\
**Post date:** [March 2, 2022, 8:21pm UTC](https://discuss.huggingface.co/t/classification-tweets-by-theme-how-do-i-start/15278/3 "2022-03-02T20:21:04Z")

</div>

I don’t have any labelled data yet. But i can label some of them, what is a ok number of data labelled in this case?

---

<div class="post-metadata">

**Author:** ![anwarika](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@anwarika](https://discuss.huggingface.co/u/anwarika)\
**Post date:** [March 2, 2022, 8:29pm UTC](https://discuss.huggingface.co/t/classification-tweets-by-theme-how-do-i-start/15278/4 "2022-03-02T20:29:21Z")

</div>

I would say at least 1k, but ideally 5k. Oof thats a lot to hand label. Maybe you can outsource it or use AWS Ground Truth

---

<div class="post-metadata">

**Author:** ![haris525](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@haris525](https://discuss.huggingface.co/u/haris525)\
**Post date:** [March 2, 2022, 9:16pm UTC](https://discuss.huggingface.co/t/classification-tweets-by-theme-how-do-i-start/15278/5 "2022-03-02T21:16:38Z")

</div>

Yes BERT with Pytorch is a good starting point. Ideally you want labelled data, and unbalanced classes (this can be bit tricky) - good luck!

---

<div class="post-metadata">

**Author:** ![ck37](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ck37/32/4045_2.png) [@ck37](https://discuss.huggingface.co/u/ck37)\
**Post date:** [March 7, 2022, 12:23pm UTC](https://discuss.huggingface.co/t/classification-tweets-by-theme-how-do-i-start/15278/6 "2022-03-07T12:23:00Z")

</div>

Or use a seeded topic model, which just requires drafting a list of keywords for each topic. See Bertopic here: [Guided Topic Modeling - BERTopic](https://maartengr.github.io/BERTopic/getting_started/guided/guided.html)
