Sebuah tools sederhana yang membantu menscrape data judul berita dengan bantuan library PyGoogleNews
# Python version 3.7 or newser
$ git clone https://github.com/algonacci/INHEAD.git
$ pip install -r requirements.txt
--set : Dataset type, it can be train/test/val
--query : A keyword to scrape related news
--topic : A target/label/class given for each news headline
--quantity : How many data want to be displayed, max 60
# To scrape data
$ python src/scraping.py --set train --query twitter --topic teknologi
# To merge all scraped data
$ python src/merge.py --set train
# To check the result with Pandas Dataframe
$ python src/check_df.py --set train --quantity 60
- Menentukan topik-topik besar yang ingin diklasifikasi
Sejauh ini sudah ada topik:
- Pendidikan
- Internasional
- Politik
- Kesehatan
- Pariwisata
- Ekonomi
- Bisnis
- Entertainment
- Teknologi
- 45.000 train set
- 5.000 validation set
- 5.000 test set