git @ Cat's Eye Technologies NaNoGenLab / 2591ae4
You call that science? That's not science, THIS is science! Chris Pressey 10 years ago
6 changed file(s) with 70 addition(s) and 37 deletion(s). Raw diff Collapse all Expand all
00 levenshtein-equidistant
11 =======================
22
3 Requirements
4 ------------
3 Hypothesis
4 ----------
5
6 I expect that if I carry out this experiment, I will discover that I was
7 not quite sure what I was expecting.
8
9 Apparatus
10 ---------
511
612 * Python 2.7.6 (probably works with older versions too)
713 * [py-editdist](http://www.mindrot.org/projects/py-editdist/)
814 * Two or three input texts
915
10 Basic Strategy
11 --------------
16 Method
17 ------
1218
1319 * Input two reference texts. Then either input a "seed text", or
1420 generate a random string of characters and use that as the seed text.
00 narrative-makefile
11 ==================
22
3 Requirements
4 ------------
3 Hypothesis
4 ----------
5
6 We can generate a story using only `make`.
7
8 Apparatus
9 ---------
510
611 * GNU Make (other makes might work too)
712
8 Basic Strategy
9 --------------
13 Method
14 ------
1015
1116 * Each point in the narrative is a goal, and may require other goals to
1217 be met, before it can be met.
1318 * Each goal outputs some text as a side-effect.
1419
15 Sample Output
16 -------------
20 Observations
21 ------------
1722
1823 $ make
1924 Once upon a time there was a brave knight.
00 poetic-inventory
11 ================
22
3 Requirements
4 ------------
3 Hypothesis
4 ----------
5
6 We hypothesize that it is possible to extract phrases from public-domain novels
7 and alphabetize them. Well, I suppose we also hypothesize that, with enough
8 input texts, the final result may look like an interesting inventory of things.
9
10 Apparatus
11 ---------
512
613 * Python 2.7.6 (probably works with older versions too)
714 * The `gutenberg.py` module from [gutenizer](https://github.com/okfn/gutenizer/)
815 * A bunch of Project Gutenberg texts in plain text format
916
10 Basic Strategy
11 --------------
17 Method
18 ------
1219
1320 * Find all phrases which are neither "beginners" nor "enders" in the sense
1421 of [join-at-pivot](../join-at-pivot/).
1724 * Dump out those phrases, capitalizing the first word and replacing each
1825 semicolon with a full stop and a paragraph break.
1926
20 Sample Output
21 -------------
27 Observations
28 ------------
29
30 (The list of input texts that produced this TBA.)
2231
2332 > A 5.9, a Believer, a Bible, a Biscay lady on her way to Seville, a Biscayan, a Blackbird, a Bonanza King, a Bricklayer passed by, a British aëroplane, a Carabineer* happened along, a Castilian, a Castilian, a Cervantes Saavedra, a Cheese Committee to consist of seven members of the Exchange, a Cheese Inspector and also a Deputy Inspector, a Chicago millionaire, a Chinaman, a Chinese body-servant, a Christian, a Colonial trader, a Crow, a Curious Thing.
2433 >
00 pyramidal-reduction
11 ===================
22
3 Requirements
4 ------------
3 Hypothesis
4 ----------
5
6 Can we transform a text by building rewriting rules for it on-the-fly?
7
8 Apparatus
9 ---------
510
611 * Python 2.7.6 (probably works with older versions too)
712 * An input sentence
813
9 Basic Strategy
10 --------------
14 Method
15 ------
1116
1217 * For each pair of symbols in the input sentence, use a rule to reduce
1318 them to a single symbol. This results in a sentence which is one
00 reluctance-generator
11 ====================
22
3 Requirements
4 ------------
3 Hypothesis
4 ----------
5
6 We hypothesize that it is possible to make a computer sound reluctant.
7
8 Apparatus
9 ---------
510
611 * Python 2.7.6 (probably works with older versions too)
712
8 Basic Strategy
9 --------------
13 Method
14 ------
1015
1116 * Use a "recursive descent generator" to generate statements suggesting
1217 reluctance. This is like a recursive descent parser, but run "in reverse."
1722 it will not mind at all creating sentences after which a linguist would
1823 be inclined to put an asterisk.
1924
20 Sample Output
21 -------------
25 Observations
26 ------------
2227
2328 $ ./reluctance-generator.py
2429 I don't think .
00 shanty-generator
11 ================
22
3 Requirements
4 ------------
3 Hypothesis
4 ----------
5
6 We hypothesize that we can get a computer to generate sea shanties, or at
7 least texts which are somewhat shanty-like.
8
9 Apparatus
10 ---------
511
612 * Python 2.7.6 (probably works with older versions too)
713 * Some input text
814
9 Basic Strategy
10 --------------
15 Method
16 ------
1117
1218 * Pick one of a number of templates.
1319 * The template will require _n_ words. Consume _n_ words from the input.
1420 * Replace the variables in the template with the words.
1521 * Repeat until no more (or not enough more) words available in the input.
1622
17 Notes
18 -----
23 It should be noted that the method described here is by no means specific
24 to shanties.
1925
20 The procedure above is not specific, by any means, to shanties. But that
21 is what we will try to generate here.
22
23 Sample Output
24 -------------
26 Observations
27 ------------
2528
2629 $ ./shanty-generator.py It was the best of times it was the worst of times
2730 It, was-was,