#!/usr/bin/python # -*- coding: utf-8 -*- # 英文を自動生成する仕組みのサンプル # # The MIT License # Copyright (c) 2008 akio0911 import random import get_data def choice_name(): return random.choice(get_data.get_names()) def choice_S(): return choice_name() def choice_O(): return choice_name() def choice_V(): return random.choice(get_data.get_verbs()) def make_sentence(): return choice_S() + " " + choice_V() + " " + choice_O() + " that " + choice_S() + " " + choice_V() + "." print make_sentence()