RandomWord

RandomWord[]

gives a pseudorandom commonly used word.

RandomWord[n]

gives a list of n pseudorandom words.

RandomWord[type]

gives a pseudorandom word of the specified type.

RandomWord[type,n]

gives a list of n pseudorandom words of the specified type.

Details and Options

  • The following types are supported:
  • "CommonWords"common words in their base forms (default)
    "KnownWords"known dictionary words in their base forms
    poscommon words that can be a given part of speech
    {"type",pos}inflected, known, etc. words filtered by part of speech
    "Stopwords"words like "the" that are often considered insignificant
  • Parts of speech can be given as "GrammaticalUnit" entities or as strings.
  • Core parts of speech are "Noun", "Verb", "Adjective", "Adverb", "Preposition", "Conjunction", "Pronoun", "Determiner", and "Interjection".
  • RandomWord selects from words available in WordList.
  • RandomWord supports the following options:
  • IncludeInflectionsFalsewhether to include inflected forms of words
    Language$Languagewhat language to use

Examples

open allclose all

Basic Examples  (4)

A random common word:

A random common noun:

Four random common adverbs:

Six random adjectives selected from known words:

Options  (2)

Language  (1)

Get a list of random Spanish words:

Language specifications can be strings or "Language" entities:

IncludeInflections  (1)

With IncludeInflections->True, inflected forms can also be included in results:

With IncludeInflections->False, only uninflected words are returned:

Properties & Relations  (2)

Use SeedRandom to get repeatable random values:

Use BlockRandom to block one use of RandomWord from affecting others:

Introduced in 2015
 (10.3)