Evaluating bids

Crio texto

Published on the January 02, 2024 in Writing & Translation

About this project

Open

Class TextCreator:
    def __init__(self, templates):
        self.templates = templates

    def generate_text(self):
        template = random.choice(self.templates)
        text = template.format(self.generate_placeholder())
        return text

    def generate_placeholder(self):
        placeholders = ["{noun}", "{adjective}", "{verb}", "{adverb}"]
        placeholder = random.choice(placeholders)
        return self.get_word(placeholder[1:-1])

    def get_word(self, category):
        word_lists = {
            "noun": ["cat", "dog", "book", "computer", "friend"],
            "adjective": ["happy", "bright", "funny", "creative", "kind"],
            "verb": ["run", "jump", "read", "write", "sing"],
            "adverb": ["quickly", "happily", "silently", "loudly", "eagerly"]
        }
        return random.choice(word_lists[category])

if __name__ == "__main__":
    templates = [
        "The {adjective} {noun} {verb} {adverb}.",
        "A {adjective} {noun} is always {adverb}.",
        "I love to {verb} {adverb} when it's {adjective}."
    ]

    Text_creator = TextCreator(templates)

    for _ in range(5):
        generated_text = text_creator.generate_text()
        print(generated_text)

Project overview

Experiênte em cria texto

Category Writing & Translation
Subcategory Proofreading
How many words? Between 1,000 and 5,000 words
Is this a project or a position? Project
Required availability As needed

Delivery term: Not specified

Skills needed