Text Tools

N-Gram Frequency Counter

Live

Count recurring word or character n-grams.

About N-Gram Frequency Counter

Count recurring word or character n-grams. Enter text, n-gram size, unit in a purpose-built ngram bars interface designed for this subject. A sliding window counts normalized word or grapheme sequences of the selected length. The result includes n-gram frequencies, total n-grams, unique n-grams, supporting detail, and clear units or diagnostics. Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements. Processing stays in your browser, and UtilityPages does not store the values you enter.

Set up N-Gram Frequency Counter

Workspace

Source workbench

Edit the source fields below and inspect the rendered output alongside your work.

This workspace updates as you edit.

Enter text.

Enter n-gram size.

Enter unit.

N-Gram Frequency Counter result

Enter the values above, then process to see a detailed result.

How N-Gram Frequency Counter works

A sliding window counts normalized word or grapheme sequences of the selected length.

How it works

A sliding window counts normalized word or grapheme sequences of the selected length. Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements.

Examples

N-Gram Frequency Counter worked example

Example input
{
    "source": "fast private tools make fast everyday tasks easier",
    "n": 2,
    "unit": "words"
}
Expected result
{
    "grams": [
        {
            "gram": "everyday tasks",
            "count": 1
        },
        {
            "gram": "fast everyday",
            "count": 1
        },
        {
            "gram": "fast private",
            "count": 1
        },
        {
            "gram": "make fast",
            "count": 1
        },
        {
            "gram": "private tools",
            "count": 1
        },
        {
            "gram": "tasks easier",
            "count": 1
        },
        {
            "gram": "tools make",
            "count": 1
        }
    ],
    "total_grams": 7,
    "unique_grams": 7
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Frequently asked questions

How does the N-Gram Frequency Counter work?

A sliding window counts normalized word or grapheme sequences of the selected length.

What information should I enter?

Enter text, n-gram size, unit. Use values and units from the same scenario so the result is internally consistent.

What results does this tool provide?

It reports n-gram frequencies, total n-grams, unique n-grams, including intermediate context where it helps you review the answer.

What limitations should I know about?

Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements.