This program searches a passed file or directory of files looking for files ending in .txt. Once found it will count the number of words for a file. Note it will not take into account apostrophes, etc... As well as it will not stem words into their base form. At the end, the program will print out the top 10 most used words.
This program uses boost 1.66 for multithreading by means of the thread_pool class, as well as boost filesystem for searching the directories, and is compiled using c++11.
- Install boost
- Checkout the Makefile to see if you need to change the boost include and lib directories.
- Run the
make
command - Run command is
./ssfi <File or Directory>
- Specify number of worker threads to use with
-t number_of_threads
by default it will use 4