-
Notifications
You must be signed in to change notification settings - Fork 11
Random Sentence
The random_sentence sub-module is the newest module and so far only has one function in the random_sentence class. This sub-module deals with randomly generating sentences. We are working toward making them more advanced and grammatically correct rather than using a sentence template. This page contains information on how to import this sub-module as well as how to use the functions in it.
Before use, make sure to import this sub-module. Do so in the following way:
from wonderwords import random_sentence
Another way you can do this is:
import wonderwords.random_sentence
The bare_bone_sentence function randomly generates a sentence composed of one article, a noun and a verb such as: The dog pouts.
bare_bone_sentence()
None
A bare bone sentence with a noun, verb and article.
from wonderwords import random_sentence
english_sentence = random_sentence.random_sentence()
# Set variable random_bare_bone_sentence to a randomly generated bare bone sentence
random_bare_bone_sentence = english_sentence.bare_bone_sentence()
This function randomly generates a bare-bone sentence with a direct object such as: The cow interests everybody.
simple_sentence()
None
Returns a simple sentence
from wonderwords import random_sentence
english_sentence = random_sentence.random_sentence()
# Set variable random_simple_sentence to a randomly generated simple sentence
random_simple_sentence = english_sentence.simple_sentence()
This function generates a bare-bone sentence with an adjective that describes the noun, such as: The red dog plays.
bare_bone_with_adjective()
None
A bare bone sentence with a noun, verb and adjective.
from wonderwords import random_sentence
english_sentence = random_sentence.random_sentence()
# Set variable random_bare_bone_sentence_with_adjective to a randomly generated bare bone sentence with an adjective
random_bare_bone_sentence_with_adjective = english_sentence.bare_bone_with_adjective()
Sentence() returns a sentence with a noun, verb, adjective and direct object. For example: The interesting man eats thoughts.
sentence()
None
Returns a sentence with noun, verb, adjective and direct object
from wonderwords import random_sentence
english_sentence = random_sentence.random_sentence()
# Set variable my_random_sentence to a randomly generated sentence
my_random_sentence = english_sentence.sentence()
⚠️ This documentation will no longer be updated, as Wonderwords version 2 is now out. You can find the new documentation at https://wonderwords.readthedocs.io
⚠️ This documentation will no longer be updated, as Wonderwords version 2 is now out. You can find the new documentation at https://wonderwords.readthedocs.io