The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.


README

This module implements a simple keyword-in-context (KWIC) search
interface -- a concordance.

Given a text (such as a plain text electronic book or journal article)
and a query in the form of a regular expressions, this module will
return a list of lines matching the query. The power (and fun) of the
module lies in the ability to exploit regular expressions. The module
also supports rudimentary sorting functions: sort by words to the left
or the right of the query, sort by regular expression (mostly). As of
version 0.02 it supports the mapping of matched queries against a 
percentage of a text enabling the developer to graph the result as a 
bar chart or histogram.

Once installed (perl Makefile.PL; make; make test; make install), you
should be able to use the concordance.pl script found in the bin
directory. Sample data -- walden.txt -- is found in the etc directory.
Try searching for human. For example:

  $ bin/concordance.pl etc/walden.txt human

The module implements, almost verbatim, the concordance programs and
subroutines described in Bilisoly, R. (2008). Practical text mining with
Perl. Wiley series on methods and applications in data mining. Hoboken,
N.J.: Wiley. pgs: 169-185. "Thanks Roger. I couldn't have done it
without your book!" Any errors are mine, not Bilisoly's.

-- 
Eric Lease Morgan <eric_morgan@infomotions.com>
August 29, 2010