TXM
Unicode-XML-TEI text/corpus analysis platform
... CQP full text search engine (http://cwb.sourceforge.net) and a range of statistical functions (factorial analysis, classification, cooccurrency analysis, etc.) based on R packages (http://www.r-project.org).
Read the scientific background at the Textométrie project web site http://textometrie.ens-lyon.fr/?lang=en.
Read a full description at the TEI Tools wiki http://wiki.tei-c.org/index.php/TXM.