Skip to content

A command line application that takes text files as inputs and returns the 10 most common words found across all files.

Notifications You must be signed in to change notification settings

MKhowaja/File-Indexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File-Indexer

A command line application that takes text files as inputs and returns the 10 most common words found across all files.

To run, ensure you have Java 8 and then run:

javac FileIndexer.java

Then, to run the program:

java FileIndexer [text_files...]

The program will read the files and count the number of occurrences of each word read. It will then output the 10 most common words across all input files.

To run tests simply execute with the text files provided. An example run is:

java FileIndexer test/input.txt test/input2.txt test/input3.txt

Output will appear in the following format:

1.      the     41371
2.      of      23326
3.      and     20131
4.      to      14255
5.      a       13603
6.      in      11884
7.      that    5706
8.      his     5585
9.      was     5343
10.     is      5142

About

A command line application that takes text files as inputs and returns the 10 most common words found across all files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages