Tweet collector for the irony-sarcasm dataset
✓ Published0🌍 Public
Aabehmiel
Last edited Jun 23, 2017
Created on Jun 23, 2017
This example collects tweets for the irony-sarcasm dataset, pulling tweet text for eight labeled subtypes (regular, sarcasm, irony, and their test splits) using Tweepy’s `statuses_lookup` API. It reads tweet IDs from tab-separated CSV files provided by Roman Klinger’s dataset, batches them by 100 with sleep delays to respect rate limits, and stores the full JSON metadata for each tweet. The code then minimizes each record to its `text` field and writes both a JSON master file and a CSV version per subtype, using pandas for ID loading and Python’s `json` and `csv` modules for output.
AI-generated description