This Pig Latin script is designed to process the Enron Email Dataset and perform three key tasks:
-
Word Count: Calculate the frequency of each word used in the email dataset, by tokenizing the email content to extract individual words.
-
Line Count: Determine the total number of lines in the dataset.
-
Unique Email Address Count: Identify and count the unique email addresses found in the emails using regular expressions.
The Enron Email Dataset contains approximately 0.5 million email messages from about 150 users, primarily senior management of Enron. The dataset was collected and prepared by the CALO Project and made public by the Federal Energy Regulatory Commission during its investigation.
To run the Pig Latin script:
-
Ensure you have Apache Pig installed and configured on your system.
-
Modify the script to specify the correct path to the Enron Email Dataset.
-
Execute the script using the following command:
pig -x local your_script.pig
- The results will be stored in separate output files: one for word count, one for line count, and one for unique email address count.