Concordance (Java) (Any Platform)

For my first Program Design, Data Structures and Algorithms assignment I was tasked to produce an application that would produce a Concordance.

A Concordance is defined on Wikipedia as being an alphabetical list of the principal words used in a book or body of work, with their immediate contexts.

My solution to this problem is writen in Java with a Swing Graphical User Interface,it provides a line number for each occurrence of an index word its surrounding context.

The program is provided as a runnable .jar file that can be started by double clicking the icon on most operating systems, however if this does not work then you can start the program from the command line using:

java -jar filename.jar 

filename being replaced by the name of the jar you wish to run.

The program requires two .txt files to be provided, these should be authored in a text editor and text provided in the following format.

index.txt - one word per line, each word being a word you wish to produce a concordance for, the name of the file does not matter.

text.txt - any source text, in virtually format, for instance you could use an ebook from

I supply two text files as examples, one index.txt and one reference text which is from Project Gutenberg, the source text is not mine and belongs to Project Gutenberg.

I have also attached the source code and javadoc if anyone wishes to find out how it works. Also there is some documentation for the original project.

Download Here!


Jonathan Field

© Jonathan Field 2011