Complete.Org: Mailing Lists: Archives: freeciv-java: October 2000:
[FreeCiv-Java] Re: Some Help Please
Home

[FreeCiv-Java] Re: Some Help Please

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-java@xxxxxxxxxxxx
Subject: [FreeCiv-Java] Re: Some Help Please
From: Erik Sigra <freeciv@xxxxxxx>
Date: Sat, 07 Oct 2000 01:13:15 +0200

Houjeh Tiourchi wrote:
> 
> The following code reads a text file, makes a tally of all the different
> words used in the file, and prints out a list of the words that appear
> most frequently, along with the number of times each word appears.
> Please explain to me what each lone of code does and how if possible. I
> am a novice and really want to learn this piece of code inside and out.

Why use a long java program? I just used a unix command to do it.
Something like:

cat foo.bar | tr "[A-ZÅÄÖ]" "[a-zåäö]" | tr -d "\(\)\_\t" | tr "
0123456789\"\-\.\,\:\;\'\=\<\>\?\!\/\*\[\]" "\n" | sort | uniq -c | sort



[Prev in Thread] Current Thread [Next in Thread]