Solved

Top 10 most used words in a text document

Posted on 2009-04-07
4
687 Views
Last Modified: 2012-08-13
How do I get the top 10 most used words in a text document ?
Any examples out their ?
0
Comment
Question by:u2envy1
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
angus_young_acdc earned 250 total points
ID: 24086236
One way would be to read each word in the document, and add it to a list.  Then do a count of how many times each word appears.
0
 

Author Comment

by:u2envy1
ID: 24086330
How will I do the count ? Then do a count of how many times each word appears.
If I have a list List<string> myList = new List<String>();
How do I count ?
myList.Add("The");
myList.Add("lazy");
myList.Add("Brown");
myList.Add("Fox");
myList.Add("was");
myList.Add("too");
myList.Add("lazy");
myList.Add("to");
myList.Add("jump");
myList.Add("over");
myList.Add("the");
myList.Add("brown");
myList.Add("dog");

0
 
LVL 29

Assisted Solution

by:Gautham Janardhan
Gautham Janardhan earned 250 total points
ID: 24086541
u can use the grioup by function available for the list to group by the words and then check the count
0
 

Author Closing Comment

by:u2envy1
ID: 31567444
Thx
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now