ngram (version 3.0.4)

rcorpus: Random Corpus

Description

Generate a corpus of random "words".

Usage

rcorpus(nwords = 50, alphabet = letters, minwordlen = 1, maxwordlen = 6)

Arguments

nwords

Number of words to generate.

alphabet

The pool of "letters" that word generation coes from. By default, it is the lowercase roman alphabet.

minwordlen, maxwordlen

The min/max length of words in the generated corpus.

Value

A string.

Examples

Run this code
# NOT RUN {
rcorpus(10)

# }

Run the code above in your browser using DataLab