?
Solved

Top 10 most used words in a text document

Posted on 2009-04-07
4
Medium Priority
?
698 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
angus_young_acdc earned 1000 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 1000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

770 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