Skip to content

Style Guide

Andy Cyca edited this page Jun 17, 2020 · 1 revision

Filenames

  • Snake_case will be used for .txt files
  • Whenever possible, the filename should be in plural (i.e. it should be relatives.txt and not relative.txt)

File contents

  • Given that Tracery/Pytracery can arbitrarily capitalize the first letter of a word with .capitalize, all content in the files should be in lowercase, except for Proper Names

File overlapping

Rationale: Files should be (more or less) self-contained lists of similar words for particular purposes. It's no use having a single, really long list called objects.txt that can fit every material thing in existence. Instead, it's more useful to have, say, kitchen_appliances.txt, land_animals.txt and so on.

Of course, there can be some overlapping between lists, and that's ok.


The ideal case is that a file can be perfectly and neatly divided into proper subsets. For instance, this ideal file:

object 1
object 2
object 3
object 4
...

...to be neatly divided like so:

1 (mod 4) 2 (mod 4) 3 (mod 4) 0 (mod 4)
object 1 object 2 object 3 object 4
object 5 object 6 object 7 object 8

But many categories aren't that clear-cut. Imagine, for example, that you wanted to create a simple "video game idea generator". For this, you could create a simple object like #videogame_adjective# #videogame_genre#). Then, you could pull a list of words from say, Steam, and divide it into these categories.

Take the following tags:

  • Stealth
  • Rogue-like
  • First-person
  • FPS
  • Third Person
  • Action
  • RPG

If no overlapping is allowed, where would you put "Stealth"? Both Stealth RPG and First-person Stealth are plausible, but in the former it's an adjective and in the latter it's a genre. Our brain is good at figuring out these two, but it's hard to put a clear line for the machine.

[tk]

Clone this wiki locally