The stop word file can be found [here](https://gitlab.my.ecp.fr/2014jinwy/BDPA_Assign2_WJIN/blob/master/stopwords).
#### 2. Count word frequency of pg100.txt
By using again the wordcount algorithm, we recount the word frequency for pg100.txt to be used later for word sorting. This time capital cases are kept to be taken acount in the similarity comparison. The output file can be found [here](https://gitlab.my.ecp.fr/2014jinwy/BDPA_Assign2_WJIN/blob/master/wordfreq).
#### 3. Output lines
In this step, several tasks should be done:
* Store all stopwords in a set
* Store all word frequency in a hashmap
* For each line:
* keep counting line number with a counter
* skip empty lines
* separate words
* filter special characters
* take out words that are stopwords
* wipe out duplicates
* sort them by their pre-calculated frequency
* output words with their line number as key
For this step, all task are done within the mapper. The tokenizer is " " or "--" as before. A set container is used to avoid duplicates. Java's build-in sort function is applied with a costumed compare function incorporating the word frequency. StringUtils's join function serves to join words together with a space.