# I have a word list/text and I need to order them by frequency. How?

**URL:** <https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190>\
**Category:** Factual Questions\
**Created:** [June 6, 2010, 7:28pm UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190 "2010-06-06T19:28:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![orcenio](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/orcenio/32/1036_2.png) [@orcenio](https://boards.straightdope.com/u/orcenio)\
**Post date:** [June 6, 2010, 7:28pm UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190/1 "2010-06-06T19:28:04Z")

</div>

I think the title says it all, but here is my problem.

I have a text file that is full of words that are made up of Unicode (utf-8) based characters. I need to create a list of the words and order them by frequency of occurrence.

I have no knowledge of programing languages (Python, C++, etc), but I am willing to learn/do anything to get this (seemingly) simple task done. Can anyone help me?

---

<div class="post-metadata">

**Author:** ![Gary\_Robson](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/gary_robson/32/3448_2.png) [@Gary\_Robson](https://boards.straightdope.com/u/Gary_Robson)\
**Post date:** [June 6, 2010, 8:34pm UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190/2 "2010-06-06T20:34:10Z")

</div>

This is a wheel that’s already been invented.

Google “word count by frequency” and you’ll find websites where you can cut & paste in your text or put your text on a web page to be analyzed.

---

<div class="post-metadata">

**Author:** ![orcenio](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/orcenio/32/1036_2.png) [@orcenio](https://boards.straightdope.com/u/orcenio)\
**Post date:** [June 6, 2010, 8:49pm UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190/3 "2010-06-06T20:49:29Z")

</div>

[quote=“Gary “Wombat” Robson, post:2, topic:542190”]

This is a wheel that’s already been invented.

Google “word count by frequency” and you’ll find websites where you can cut & paste in your text or put your text on a web page to be analyzed.  
[/QUOTE]  
A link would be nice. This is [what I got](http://www.google.ca/search?sourceid=chrome&ie=UTF-8&q=%22word+count+by+frequency%22).

Also I would like a program that can do this for a file the exists on my computer. A web based program probably cant handle a large set of data; and splitting the text up by cutting, pasting and processing it in blocks defeats the purpose of ordering the words by frequency.

I also need a program that works with unicode (non-latin based scripts).

---

<div class="post-metadata">

**Author:** ![orcenio](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/orcenio/32/1036_2.png) [@orcenio](https://boards.straightdope.com/u/orcenio)\
**Post date:** [June 6, 2010, 9:00pm UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190/4 "2010-06-06T21:00:35Z")

</div>

For future reference [this did the trick](http://lifehacker.com/394650/word-count-analyzes-word-frequency).

---

<div class="post-metadata">

**Author:** ![Tastes\_of\_Chocolate](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tastes_of_chocolate/32/3232_2.png) [@Tastes\_of\_Chocolate](https://boards.straightdope.com/u/Tastes_of_Chocolate)\
**Post date:** [June 7, 2010, 4:42pm UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190/5 "2010-06-07T16:42:39Z")

</div>

A day late and a dollar short, but for a way to do this without using someone else’s website:

Take your text and past it into Excel, all into one cell. Format it as a single paragraph  
Use “Text to Columns” to convert the paragraph to a row with one word in each cell.  
Copy the row, and use “Paste Special” “Tranpose” to convert your row to a column, one word in each cell.  
Sort the column.  
Use “Subtotals” on the column, and ask it to “Count” the number of times each word appears.

---

<div class="post-metadata">

**Author:** ![Superhal](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Superhal](https://boards.straightdope.com/u/Superhal)\
**Post date:** [June 8, 2010, 12:59am UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190/6 "2010-06-08T00:59:07Z")

</div>

Also late, but I think the =countif function in Excel would handle it easily.

---

<div class="post-metadata">

**Author:** ![orcenio](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/orcenio/32/1036_2.png) [@orcenio](https://boards.straightdope.com/u/orcenio)\
**Post date:** [June 8, 2010, 1:52am UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190/7 "2010-06-08T01:52:42Z")

</div>

I actually couldn’t use the program because it was to slow to process the amount of data I had (after 5 hours it was nowhere near to 10% done). However as luck would have it I[found this](http://www.authorsden.com/categories/article_top.asp?catid=20&id=39307) and used the MS word macro to do the job.

But thanks for the suggestions, very creative.

---

<div class="post-metadata">

**Author:** ![not\_alice](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/not_alice/32/7283_2.png) [@not\_alice](https://boards.straightdope.com/u/not_alice)\
**Post date:** [June 8, 2010, 4:03am UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190/8 "2010-06-08T04:03:34Z")

</div>

on \*linux from the command line:

\> sort file|wc -l

done.

---

<div class="post-metadata">

**Author:** ![DChord568](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@DChord568](https://boards.straightdope.com/u/DChord568)\
**Post date:** [June 8, 2010, 4:11am UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190/9 "2010-06-08T04:11:57Z")

</div>

For anyone else who ever faces this task (and who happens to have a Mac), I recommend this standalone program, which will generate word lists from text files, URLs, or anything you type or paste in manually:

[Concorder Pro](http://www.versiontracker.com/dyn/moreinfo/macosx/17768)

---

<div class="post-metadata">

**Author:** ![Gary\_Robson](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/gary_robson/32/3448_2.png) [@Gary\_Robson](https://boards.straightdope.com/u/Gary_Robson)\
**Post date:** [June 8, 2010, 5:13pm UTC](https://boards.straightdope.com/t/i-have-a-word-list-text-and-i-need-to-order-them-by-frequency-how/542190/10 "2010-06-08T17:13:23Z")

</div>

> [@orcenio](#):
>
> A link would be nice. This is [what I got](http://www.google.ca/search?sourceid=chrome&ie=UTF-8&q=%22word+count+by+frequency%22).
> 
> Also I would like a program that can do this for a file the exists on my computer. A web based program probably cant handle a large set of data; and splitting the text up by cutting, pasting and processing it in blocks defeats the purpose of ordering the words by frequency.
> 
> I also need a program that works with unicode (non-latin based scripts).

Sorry, I didn’t think a link was necessary. Doing the Google search without putting quotes around the phrase (like [this](http://www.google.ca/search?hl=en&q=word+count+by+frequency&btnG=Search&aq=f&aqi=&aql=&oq=&gs_rfai=)) yields about 700,000 results, and the first page is almost all programs or websites that will do the job.
