Gram size: Pick Unigrams, Bigrams or Trigrams, or choose N-gram and enter any N between 1 and 10. For example, the sentence "The cat sat on the mat." produces the unigrams the, cat, sat, on, the, mat, the bigrams the cat, cat sat, sat on, on the, the mat and the trigrams the cat sat, cat sat on, sat on the, on the mat.
Units - Words / Letters: Word mode treats each word as one unit. Letters mode makes every character a unit and replaces spaces with your space symbol, so "Hi there." becomes the units h, i, _, t, h, e, r, e and the bigrams hi, i_, _t, th, he, er, re.
Sentence handling: Sentences are detected from full stops, question marks, exclamation marks and line breaks. By default the tool stops at each sentence, so the last word of one sentence never pairs with the first word of the next. In corpus mode sentences are joined: "I like rain. Rain is good." gains the cross-boundary bigrams rain rain and is good alongside the normal ones.
Separators: The inside-gram separator joins words within a gram (space by default, or underscore, hyphen, comma or pipe), and the between-grams separator separates grams from each other (new line by default).
Unique grams with counts: Switching the output style to counts turns "The cat sat on the mat. The cat was happy." into the cat: 2, cat sat: 1, .... Combine it with Min occurrences set to 2 to keep only the cat: 2, and with Sort order: Most frequent first to bring repeated phrases to the top - ideal for finding the phrases an article repeats most.
Lowercase & punctuation: Lowercase output normalises "The" and "the" into the same gram. Remove punctuation deletes the symbols listed in the punctuation box before the grams are built, while apostrophes are always kept so contractions like isn't stay whole.
Copy & Download: Copy the results to your clipboard or download them as a ngrams.txt file with one click. You can also load a .txt or .csv file instead of pasting.