Initial commit

This commit is contained in:
Chris
2022-02-27 18:51:59 -05:00
commit 370415e29b
9 changed files with 523 additions and 0 deletions

28
README.md Normal file
View File

@@ -0,0 +1,28 @@
# Types Lab
In this lab, we learn about types by writing functions whose inputs and outputs
are English parts of speech. Once you finish, you will be able to generate
syntactically-correct phrases which you can use to write auto-poetry like:
Roses are red<br>
Violets are blue<br>
Evenings are poisonous<br>
And so are you.<br>
I used to have a formative scratch<br>
Until i swapped it for an icy latch.
There once was a person named pete<br>
Who owned an optical cleat.<br>
He widely canvassed it,<br>
And then he canvased it,<br>
Until it turned into a beat.
## Usage
- `vocabulary.py` has a bunch of functions for picking random words.
` `grammatical_types.py` defines types like `Noun`, `Adjective`, and `TransitiveVerb`.
- `grammar.py` has a bunch of functions for combining and transforming
grammatical types. These are unfinished; it's your job to write them.
- `poetry.py` has functions for writing beautiful auto-poems. Once `grammar.py`
is complete, try running `python poetry.py`.