else: trials = 1 trace_size = TRACE_SIZE v_nouns = Variate(master_noun_counts) v_verbs = Variate(v_master_verb_counts) recorded_nouns = [] for j in range(0, trials): for i in range(0, trace_size): if (ENABLE_DEBUG_OUT): if ((i % DEBUG_PRINTOUT_FREQ == 0) and (j == 0) and (i != 0)): sys.stderr.write("picked %d\n" % (i)) # pick verb verb = v_verbs.getRand() # pick noun noun = v_nouns.getRand() if (RUN_STATS_ONLY): if noun not in noun_counts: noun_counts[noun] = 0 noun_counts[noun] += 1 if verb not in verb_counts: verb_counts[verb] = 0 verb_counts[verb] += 1 # record noun as a title if (GENERATE_TITLES_FILE and noun not in recorded_nouns): titles_file.write(noun + "\n")