NAME

adjusted_frequency.pl - computes the adjusted frequency of entries.


SYNOPSIS

adjusted_frequency.pl [-h|--help --man -c|--columns] DATA

Input

DATA is a tab-delimited file with any number of fields for the entry (e.g. lemma), one field (second last) for the class (e.g. genre), and one field (last) for the frequency of that class. Could be redirected from STDIN.

Optional options

-h|--help
prints a help message to STDOUT.

--man
prints full documentation in man page format.

-c|--columns
indicates that the input file has one line of column headers (which should be skipped).

Output

A tab-delimited file with adjusted frequency, and original entry fields.


DESCRIPTION

This Perl script computes the Adjusted Frequency (AF), or Korrigierte Frequenz, for each entry. AF was introduced by Inger Rosengren: Ein Frekvenzwörterbuch der deutschen Zeitungssprache, 1972, Gleerup Lund. It is computed as follows:

AF = ( sum[i = 1 to n]( sqrt( d[i] * x[i] ) ) )^2

where

n = number of classes

d[i] = relative size of class i

x[i] = frequency in class i

Prints to STDOUT.


LICENSE

Copyright (C) 2005-2006 Eva Forsbom (evafo@stp.lingfil.uu.se)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


AVAILABILITY

http://stp.lingfil.uu.se/~evafo/resources/basevocpool/


VERSION HISTORY

Created: 2005-01-24: Eva Forsbom

$Log: adjusted_frequency.html,v $

Revision 1.1 2006/08/11 12:31:59 eva

HTML documentation for Perl scripts

Revision 1.3 2006/08/11 12:10:04 eva Added pod usage to Perl files

Revision 1.2 2006/08/08 16:31:42 eva Added pod documentation.