This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet to act like MS word count feature

 
guru naan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i want to write an applet that will count the number of words on a web page. Anyone got any ideas? Thanks.
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't know Microsoft invented the idea of counting words. Boy will the people who wrote the Unix "wc" program be surprised.
First you have do determine what's a "word". A web page is full of a lot of invisible text that you probably don't want to count, so you need something that takes the HTML and discriminates between the tags, stylesheet stuff, JavaScript and such and the display text.
Try searching the web. Maybe someone already wrote something. If I had to do it myself, I'd probably write an app in Perl, since it has an HTML deconstructor and word detection is built right into the language, but someone else may have a better solution in Java.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Your chosen name here at the ranch is not a valid one. If you wish to keep posting please read the naming policy and re-register with a valid user name (i.e., firstName + space + lastName).
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic