Count occurence of words and phrases

Hi,

I’m looking for a tool or extension like the Linguist extension that can take some words and phrases as input, and count how many times they show up in a document. For example, I would have different counts for:

social
media
social media

Is there such a tool/extension? If not, maybe I will tweak Linguist to do that… if I can.

The reason I need this: I do a lot of SEO writing. With such writing, I need to make sure that some words or phrases appear in the text. But I also don’t want the same words or phrases to appear too often. When I write, I often don’t notice the “density” until I read the final text.

This tool does it, but it doesn’t find all the phrases I want, and it doesn’t tell me the ones that should appear but are not there.

I read the early replies, and most of the options are manual.

I feel like my best option, at this point, is to modify Linguist to support what I want by:

  • adding the ability to take a list of words or phrases as input
  • output (in a separate document) the sorted count and percentage for each

Hopefully, this is clearer.

If there is something obvious that I’m overlooking, let me know.

Thanks,

L

(reformatted by ajlittoz to make the example clear)

Can’t answer to such a vague question. What is your purpose beyond counting words? In which format are your documents recorded: .txt, .odt, .doc(x), … Is it important to keep the formatting (because formatting make it difficult to use brute force searching)?

Provide any clue which could help to give you an advice.

Please do not use Add Answer but edit your original question to enhance the details of your question (answers are reserved for solutions to a problem on this Q&A site).

If you’re willing to export without formatting (as .txt), you have specialised apps like GLIMPSE or SWISH-E (the latter being more fit for web pages lookup). Common utilities like grep or awk could be a starting point.

For searching words, follow @mariosv answer.

To count phrases, you can also use Ctrl+H and Replace all, and look at the new info in the Find & Replace dialog, then Undo

image description

¹ There is a bug here in version 6.4.7.2 (not seen in 7.0.4.2, nor in 7.1.0.3) that undo wouldn’t work as expected. So, save your changes before trying that.

There is a bug

I restored my user profile at no avail.

Count words one by one it’s easy.

Select the word - [Ctrl+H] - Find All, on the status bar you can see how many times it is found.

To know about phrases,
Select the phrase, in the status bar you can see how many words it has, take note - [Ctrl+H] - Find All, on the status bar you can see how many words has been found, divide by the number of words in the phrase.

Not Ctrl + H, but Ctrl + F

Ctrl + H for Find & Replace, and Ctrl + F for Find. Both work here.