Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enkiv2/constrained-writer
Apply various constraints & autocomplete variations in a simple editor
https://github.com/enkiv2/constrained-writer
Last synced: 1 day ago
JSON representation
Apply various constraints & autocomplete variations in a simple editor
- Host: GitHub
- URL: https://github.com/enkiv2/constrained-writer
- Owner: enkiv2
- License: other
- Created: 2016-05-10T16:37:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-31T13:40:15.000Z (about 7 years ago)
- Last Synced: 2024-08-02T05:12:04.355Z (3 months ago)
- Language: Python
- Size: 48.8 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# 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.txtThen, 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](cyber.png)