Update README.
Chris Pressey
1 year, 10 months ago
0 | To run | |
1 | ------ | |
0 | Dissociated Parse | |
1 | ----------------- | |
2 | ||
3 | A submission for NaNoGenMo 2021 ([#62][]). | |
4 | ||
5 | [#62]: https://github.com/NaNoGenMo/2021/issues/62 | |
6 | ||
7 | It's well known that Markov chains don't understand grammar; any sequences | |
8 | in the output that might look grammatical are only there because | |
9 | grammatical-looking sequences are statistically likely. | |
10 | ||
11 | This is an experimental variation on a Markov generator that _does_ retain | |
12 | some of the syntactic structure of the original text. | |
13 | ||
14 | Turns out we can run the Dissociated Press algorithm, not just on a list | |
15 | of words like usual, but on a forest of parse trees. I call this variation | |
16 | **Dissociated Parse**. | |
17 | ||
18 | ## To run | |
19 | ||
20 | You'll need Python 3 (I used the version that ships with Ubuntu 20.04, | |
21 | which is Python 3.8.10) and the `link-parser` executable installed. | |
22 | ||
23 | Sources for `link-parser` can be found on GitHub: | |
24 | [opencog/link-grammar](https://github.com/opencog/link-grammar). I built | |
25 | it from source. YMMV. | |
26 | ||
27 | After you have the executables, you can: | |
2 | 28 | |
3 | 29 | virtualenv --python=python3.8 venv |
4 | 30 | source venv/bin/activate |
11 | 37 | ./04_parse.py # this one will take a while |
12 | 38 | ./05_build.py |
13 | 39 | ./06_traverse.py |
14 |