Search code examples
emeditor

What is the most common word in EmEditor


I got like 30mlion words in Emeditor format looks like:

Money
Love
Money
France
Telephone
Fork
.
.
.

I would like to know which word has the most repetitions. its possible to check it? I dont want do it manualy like bookmarking or find next.

I would like it in this form or in any other:

3200 Money

3190 Love

etc.


Solution

  • In EmEditor, select Extract Frequent Strings on the Search menu, accept the default options, and click OK.

    enter image description here

    The result output of your sample will be like this:

    Extract Frequent Strings output

    If you prefer a macro, use this line:

    document.selection.ExtractFrequent(eeFreqTypeLines, eeFindReplaceCase, 1, 100, "");
    

    To run this, save this code as, for instance, Macro.jsee, and then select this file from Select... in the Macros menu. Finally, select Run Macro.jsee in the Macros menu while a document with a list of words is active.