S. Fisher wrote:
--- On Wed, 3/20/13, S. Fisher wrote:
The program reads a text file and counts the number of
unique words,
and also displays the number of times the most common word
was found.
For comparison, here's a C++ program. Unlike the Pascal version,
it shows the 20 most common wor
--- On Wed, 3/20/13, S. Fisher wrote:
> The program reads a text file and counts the number of
> unique words,
> and also displays the number of times the most common word
> was found.
>
For comparison, here's a C++ program. Unlike the Pascal version,
it shows the 20 most common words. Also,
--- On Wed, 3/20/13, S. Fisher wrote:
> The program reads a text file and counts the number of
> unique words,
> and also displays the number of times the most common word
> was found.
>
Added an iterator of sorts for regular expressions. This allows
if re.exec( line ) then begin
s
Not actually a hash-table, but an AvgLvlTree, which can be used the
same way. The AvgLvlTree unit comes with Lazarus; if you don't have
that, you can download avglvltree.pas here:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/components/lazutils/avglvltree.pas?root=lazarus&view=log
There do