Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pword(1) — NeXTstep 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ixBuild(1)

pword(1)  —  UNIX Programmer’s Manual

NAME

pword − generates a histogram on the words in a file

SYNOPSIS

pword [-acflpv][-ivalue][-mvalue][-nvalue]
[-Pvalue][-svalue][-tvalue][-wwftable][file ...]

DESCRIPTION

Scans the named files, or the standard input if no file names are supplied, and generates a histogram on the standard output for each file, ranking the words comprising each file by weight.  The output consists of white space separated "word weight" pairs, one pair per line, in descending order of weight.  pword can also generate sliding window histograms useful for word correlation measurements. 
 
pword provides three weighting methods.  One uses the absolute frequency of the word, the second uses the file relative frequency of the word, and the third uses an index of peculiarity, as computed by wordPeculiarity(3). 
 
The file relative frequency of a word is the ratio of the absolute frequency of the word to the number of words in the file. The index of peculiarity is the normalized ratio of the file relative frequency to the relative frequency of the word with respect to a base domain, usually common English. 

OPTIONS

a Weights by absolute frequency, instead of file relative frequency. 

c Breaks words at contractions and hyphenations. 

f Weights by index of peculiarity, instead of file relative frequency. 

i Sets the shift for the sliding window to ’value’.  The default is half the window size.  This switch is effective only in conjunction with the s switch. 

l Prevents the folding of words to lower case. 

m Limits output to words occurring at least ’value’ times. 

n Limits output to the first ’value’ words. 

p Disables the folding of plurals to singular form. 

P Limits output to the most significant ’value’ per cent of the full histogram. 

s Slides a window of ’value’ bytes in length over the file, and generates a running histogram with window-relative weighting. 

t Limits output to words with a weight of at least ’value’.  Note that the interpretation of ’value’ depends on the weighting method. 

v Prints the name of each file on the standard output before generating the histogram for that file. 

w Uses wftable instead of the default word frequency table, /usr/lib/indexing/files/English/Default.wf. 

SEE ALSO

ixBuild(1)

NeXT Computer, Inc.  —  October 18, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026