Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

My word count utility

1 view
Skip to first unread message

Greg Arzoomanian

unread,
Apr 1, 2002, 6:41:34 PM4/1/02
to

I noticed a few posts recently asking about utilities to do word
counts. I wrote my own MFC app to do this (to help in writing
Letters to the Editor). It counts words in either a text file,
or in text that has been copied to the clipboard. It's
32K, and I put it on my web site at:
http://users.ids.net/~gregan/wc.exe

It's easy enough to use: after you click on the icon, a file open
dialog comes up for selecting an ascii file to check. After that,
the main dialog comes up, with a control that displays the number
of words in the file. There's also a "Clipboard" button that
will count the words in a selection copied to the clipboard.

Check it out, and let me know if it's useful. As always,
suggestions and comments will be appreciated.

Greg Arzoomanian
gre...@ids.net
http://users.ids.net/~gregan/arzoosw.html
Providence, RI, USA

Kaelwyn

unread,
Apr 1, 2002, 6:48:50 PM4/1/02
to
"Greg Arzoomanian" <gre...@ids.net> wrote...

>
> I noticed a few posts recently asking about utilities to do word
> counts. It's 32K, and I put it on my web site at:
> http://users.ids.net/~gregan/wc.exe
>

> Check it out, and let me know if it's useful. As always,
> suggestions and comments will be appreciated.
>
It's neat, small and quick. I like that. Could you tell us what rules you used
for the program to determine what constitutes a word?

How about adding a feature to let the user choose word and sentence seperators?

Thank you very much for the cool program!

Kaelwyn
-----
ASCII to ASCII, DOS to DOS....

Greg Arzoomanian

unread,
Apr 1, 2002, 8:48:40 PM4/1/02
to

"Kaelwyn" <kae...@bonbon.net> wrote in message

> It's neat, small and quick. I like that. Could you tell us what rules
> you used
> for the program to determine what constitutes a word?

I just used iostreams to input into a string, i.e.

// Open filename
ifstream istrm((LPCTSTR )m_filename);
int count = 0;
// loop on words
for (;;)
{
string word;
istrm >> word;
if (!istrm)
break;
count++;
}

There was a bit more work for checking text from the clipboard.

> How about adding a feature to let the user choose word and
> sentence seperators?

There may be some facility in iostreams to allow picking of
whitespace. What would be the need for this?

Greg

Kaelwyn

unread,
Apr 1, 2002, 9:24:28 PM4/1/02
to
"Greg Arzoomanian" <gre...@ids.net> wrote in message...

>
> There was a bit more work for checking text from the clipboard.
>
> > How about adding a feature to let the user choose word and
>
> There may be some facility in iostreams to allow picking of
> whitespace. What would be the need for this?
>
Duh on me, I didn't mean to add 'sentence seperators' in there.

As for word seperators, I may be the only user who would want this feature, but
I have noticed when I use TextStat that I get vastly different word counts with
the '<' and '>' specified as word seperators and with them not when counting the
words in HTML documents.

Again, thank you for sharing this really neat little utility!

Kaelwyn
--
"All we are is just dust in the wind dude." --Ted 'Theodore' Logan

mardirossian

unread,
Apr 2, 2002, 1:08:39 PM4/2/02
to

"Greg Arzoomanian" <gre...@ids.net> a écrit dans le message
> news:uahrpug...@corp.supernews.com...
> http://users.ids.net/~gregan/wc.exe

> Check it out, and let me know if it's useful. As always,
> suggestions and comments will be appreciated.

Very good , Greg .

Thank you

patrick


0 new messages