Chainscape
An exploration of the algebraic properties of Markov Chains, for NaNoGenMo 2023.
Exciting algebraic discoveries
Watch this space. In the meantime, you can read this issue.
Instructions for generating novel
(bash
or similar shell on Ubuntu 20.04 or similar system)
git clone https://codeberg.org/catseye/T-Rext
cd T-Rext
git fetch origin
git checkout 0.4
cd ..
git clone https://codeberg.org/catseye/Chainscape
cd Chainscape
virtualenv --python=python3.9 venv
source venv/bin/activate
python3 --version # Python 3.9.16
pip install -r requirements.txt
mkdir corpus
for N in 11 16 45 55 98 345 768 2701 5921 64317; do
wget "https://gutenberg.org/cache/epub/$N/pg$N-images.html" -O "corpus/$N.html"
python3 src/extract-tokenstream.py "corpus/$N.html" > "corpus/$N.txt"
sleep 10
done
echo "The Other and the Same" >novel.md
echo "======================" >>novel.md
python3 src/transition-matrix.py intersect corpus/*.txt --seed 50000 --count 69972 | ../T-Rext/bin/t-rext - >>novel.md
wc -w novel.md # 50250 novel.md
export HTML="The Other and the Same.html"
echo '<!DOCTYPE html>' >"$HTML"
echo '<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>' >>"$HTML"
markdown_py -o html < novel.md >>"$HTML"
Commit History
@main
git clone https://git.catseye.tc/Chainscape/
- Ignore files generated by the instructions. Chris Pressey 11 months ago
- Update the instructions, again. Chris Pressey 11 months ago
- Small edits to README. Chris Pressey 11 months ago
- Improve instructions. Chris Pressey 11 months ago
- Clean up the tool that extracts a tokenstream from an HTML file. Chris Pressey 11 months ago
- Add instructions for generating the novel. Chris Pressey 11 months ago
- Checkin of materials I have been working on during NaNoGenMo 2023. Chris Pressey 11 months ago