Generate Skip-grams

Create flexible N-grams that allow skipping words or characters.

0 Words | 0 Chars
Convert on change
0 Lines | 0 Items
ReadOnly Mode

Flexible Skips

Define exactly how many words or characters can be skipped to find hidden patterns.

Instant Results

Processing happens instantly in your browser. No server delays.

Word & Char

Support for both Word skip-grams and Character skip-grams.

Try These Examples

1-skip-2-grams (Word)

Bigrams with up to 1 skipped word allowed.

Apply Now

2-skip-3-grams (Word)

Trigrams allowing up to 2 skipped words between parts.

Apply Now

1-skip-2-grams (Char)

Character pairs with up to 1 skipped character.

Apply Now

Regular Bigrams (0-skip)

Equivalent to standard bigrams (no skipping).

Apply Now

What are Skip-grams?

A skip-gram is a generalization of an n-gram where the components (words or characters) do not need to be consecutive in the original text. Instead, they can be separated by gaps (skips).

The term is widely used in Natural Language Processing (NLP), particularly in models like Word2Vec, where skip-grams help capture the context of words even when they are not immediately adjacent.

k-skip-n-grams Explained

The formal definition used in this tool is k-skip-n-grams:

  • n: The number of items (words/chars) in the sequence.
  • k: The maximum number of items that can be skipped between any two items in the sequence.

For example, in the sentence "The quick brown fox":

  • Regular Bigrams (n=2, k=0): "The quick", "quick brown", "brown fox"
  • 1-skip-2-grams (n=2, k=1): Includes the above PLUS "The brown" (skipped 'quick'), "quick fox" (skipped 'brown').

How to use this tool

  1. Enter Text: Paste your content or drag & drop a file.
  2. Set N (Size): Choose the length of the gram (e.g., 2 for pairs).
  3. Set K (Skips): Choose the maximum skip distance allowed.
  4. View Results: The tool generates all valid subsequences meeting your criteria.