Package: ngram 3.2.3

ngram: Fast n-Gram 'Tokenization'

An n-gram is a sequence of n "words" taken, in order, from a body of text. This is a collection of utilities for creating, displaying, summarizing, and "babbling" n-grams. The 'tokenization' and "babbling" are handled by very efficient C code, which can even be built as its own standalone library. The babbler is a simple Markov chain. The package also offers a vignette with complete example 'workflows' and information about the utilities offered in the package.

Authors:Drew Schmidt [aut, cre], Christian Heckendorf [aut]

ngram_3.2.3.tar.gz
ngram_3.2.3.zip(r-4.7)ngram_3.2.3.zip(r-4.6)ngram_3.2.3.zip(r-4.5)
ngram_3.2.3.tgz(r-4.6-x86_64)ngram_3.2.3.tgz(r-4.6-arm64)ngram_3.2.3.tgz(r-4.5-x86_64)ngram_3.2.3.tgz(r-4.5-arm64)
ngram_3.2.3.tar.gz(r-4.7-arm64)ngram_3.2.3.tar.gz(r-4.7-x86_64)ngram_3.2.3.tar.gz(r-4.6-arm64)ngram_3.2.3.tar.gz(r-4.6-x86_64)
ngram_3.2.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
ngram/json (API)

# Install 'ngram' in R:
install.packages('ngram', repos = c('https://wrathematics.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/wrathematics/ngram/issues

On CRAN:

Conda:

ngramtexttext-mining

9.99 score 72 stars 6 packages 892 scripts 1.1k downloads 5 mentions 18 exports 0 dependencies

Last updated from:99ebbc3790. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK125
linux-devel-x86_64OK106
source / vignettesOK173
linux-release-arm64OK107
linux-release-x86_64OK107
macos-release-arm64OK72
macos-release-x86_64OK399
macos-oldrel-arm64OK91
macos-oldrel-x86_64OK179
windows-develOK79
windows-releaseOK82
windows-oldrelOK81
wasm-releaseOK82

Exports:babbleconcatenateget.nextwordsget.ngramsget.phrasetableget.stringgetseedmultireadng_orderngramngram_aswekapreprocessprintrcorpusshowsplitterstring.summarywordcount

Dependencies:

Guide to the ngram Package

Rendered fromngram-guide.Rnwusingutils::Sweaveon Jun 01 2026.

Last update: 2022-03-13
Started: 2014-06-16

Readme and manuals

Help Manual

Help pageTopics
ngram: Fast n-Gram Tokenizationngram-package
ngram Babblerbabble babble,ngram-method
Concatenateconcatenate
getseedgetseed
ngram Gettersget.nextwords get.nextwords,ngram-method get.ngrams get.ngrams,ngram-method get.string get.string,ngram-method getters ng_order ng_order,ngram-method
Multireadmultiread
n-gram Tokenizationngram tokenize
Class ngramngram-class
ngram printingngram-print print,ngram-method show,ngram-method
Get Phrasetableget.phrasetable phrasetable
Basic Text Preprocessorpreprocess
Random Corpusrcorpus
Character Splittersplitter
Text Summarystring.summary
Weka-like n-gram Tokenizationngram_asweka Tokenize-AsWeka
wordcountwordcount wordcount.character wordcount.ngram