Exemplo n.º 1
0
import random
from wordtools import wordLists, names
from wordtools import conceptnet_searcher
from attribute import Attribute
from wordtools import md_writer
from weapon import Weapon
from injury import Injury
from wordtools import aOrAn

names = names.Names()
words = wordLists.WordLists()


def generate_quality():
    while True:
        quality = words.get_living_thing_adj()
        try:
            conceptnet_searcher.get_concept_relations(quality)
            return quality
        except Exception:
            continue


class Person:
    def __init__(self):
        self.gender = random.choice("male" "female")
        self.possessive_pronoun = 'her'
        self.pronoun = 'she'

        if self.gender == 'male':
            self.possessive_pronoun = 'his'
Exemplo n.º 2
0
 def __init__(self, state):
     self.state = state
     self.words = wordLists.WordLists()