Skip to content
Apply various constraints & autocomplete variations in a simple editor
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
COPYING
README.md
autosuggest.py
constrained-writer.py
constraintWriterTool.py
cyber.png
guiUtil.py
templateScripting.py
templating.py
word_transformations.py

README.md

constrained-writer

Apply various constraints & autocomplete variations in a simple editor

How to use

First, create a 'bigram model' from one or more text files:

./constraintWriterTool.py compile myCorpus.txt myModel.bigrams
./constraintWriterTool.py compileMulti myBigModel.bigrams myFirstCorpus.txt mySecondCorpus.txt

Then, run the GUI editor:

./constrained-writer.py

You can bring in your model as a whitelist or blacklist for highlighting disallowed words (like in Up-goer Five), or bring it in as an "autosuggest corpus".

As you type into the left hand panel, if you have brought in an autosuggest corpus, suggestions should appear at the right. Press control-return to accept the selected item, or control-up and control-down to select a different item. If you have a whitelist, non-whitelisted words will appear with a green background; if you have a blacklist, blacklisted words will appear with a red background.

Example of constrained-writer running with an autosuggest made from cyberpunk novels

You can’t perform that action at this time.