BabelPad Help : String Frequency

String Frequency Dialog Box

This dialog box allows you to calculate the frequency in the current document of a user-supplied list of text strings. You may launch this tool by selecting "String Frequency..." from the Tools menu, or by pressing the third button on the Document toolbar. When the dialog box is open it looks like this:

You now need to load the list of text strings to calculate the frequency for. Do this by clicking on the "Load Strings" button, and selecting the file to load from your file system. The file should be encoded as UTF-8 (with or without a BOM, and should list each string to be calculated on a separate line. Blank lines are ignored. Once you have loaded the strings the dialog box should looks something like this:

The following options are available for configuring the results display and string matching:

You may calculate the frequency of each listed string in the current document by clicking on the "Calculate Frequency" button. During calculation a progress bar will indicate the current progress of the operation (this may take some time for very large files and very long lists of strings), and all other functions will be disabled. Be careful not to press the Escape key whilst the operation is in progress or else the dialog box may close immediately after the operation has completed. If the checkbox "Save results to file" has not been checked then when the operation completes the string frequencies will be displayed in the results area of the dialog box:

The column headed "Count" gives the total number of occurences of the string in the document. The "First Line" or "Line Numbers" column is only present if either "First line number only" or "All line numbers" has been checked. You may sort the list by sequence number, string, count or first line by clicking on the appropriate table header. To reverse the order of sort (ascending or descending) click the same header again. In order to sort the strings according to the Unicode Collation Algorithm, copy the list to BabelPad, and use the BabelPad sort functionality (Columns > Sort Columns... from the Edit menu).

If the checkbox "Save results to file" is checked when you press the "Calculate Frequency" button then when the operation completes you will be prompted to save the results to file (tab-separated and encoded as UTF-8), and the results area of the dialog box will not show any counts.

The following additional buttons are available:

See Also

Download | Help Contents