PB
Available
text_fields
lock Free · Private · In-Browser

N-Gram Generator

List consecutive word windows with a selectable size from one to five.

 

How N-Gram Generator works

N-Gram Generator handles overlapping sequences of one through five whitespace-separated tokens while preserving each token's original case and punctuation. After normalizing runs of whitespace into token boundaries, the generator slides a window of the chosen size forward by one token and emits every complete window. The N-Gram Generator exposes its text, words per n-gram controls so this particular convention stays inspectable instead of hiding behind an unexplained preset.

With four default words and size two, the windows are one two, two three, and three four, each placed on its own line. Writers and analysts can inspect recurring phrase candidates, prepare simple language-model examples, or understand how adjacent token windows are constructed. The N-Gram Generator presents a deterministic plain-text result that can be copied and compared with the worked value before it enters another workflow.

Limits and private processing

This tool uses whitespace tokenization rather than linguistic sentence parsing, so attached punctuation stays with its word and no window crosses a missing token. The N-Gram Generator performs its complete operation locally in your browser; neither the source text nor its settings are uploaded, stored remotely, or sent through an external request.

Frequently Asked Questions

How does the N-Gram Generator work?

After normalizing runs of whitespace into token boundaries, the generator slides a window of the chosen size forward by one token and emits every complete window.

What does the default N-Gram Generator example return?

With four default words and size two, the windows are one two, two three, and three four, each placed on its own line.

What limitation should I know about?

This tool uses whitespace tokenization rather than linguistic sentence parsing, so attached punctuation stays with its word and no window crosses a missing token.

Is the N-Gram Generator private?

Yes. This specific n-gram generator operation runs locally in your browser and does not transmit the input or settings.

Take it further
All Free Tools

Browse the full set of free, private, in-browser tools.

Learn More arrow_forward