#!/usr/bin/perl -w
################################################################
# phi.pl : Inner coincidence index (Friedman's Phi)            #
#    Input from STDIN : Text                                   #
#    Output to STDOUT : list of pairs (letter, frequency)      #
#--------------------------------------------------------------#
# Transliteration of special characters according to English   #
#   rules                                                      #
# For special characters of other languages use preptext.pl    #
#   first.                                                     #
#--------------------------------------------------------------#
# Klaus Pommerening 1997-Sep-12, 2014-Jan-04                   #
################################################################

require "auxcrypt.pl";

$text = &gettext;                   # Get text as list

print "Inner coincidence index phi = ", &phi($text), "\n";
