Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taylordotfish/markov-complete
(old/unmaintained) A hackathon project written with @alyssarosenzweig. Inspired by code written by @kach and me.
https://github.com/taylordotfish/markov-complete
Last synced: 1 day ago
JSON representation
(old/unmaintained) A hackathon project written with @alyssarosenzweig. Inspired by code written by @kach and me.
- Host: GitHub
- URL: https://github.com/taylordotfish/markov-complete
- Owner: taylordotfish
- License: apache-2.0
- Created: 2016-11-12T12:59:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-06T06:22:29.000Z (almost 4 years ago)
- Last Synced: 2024-08-02T05:11:13.904Z (3 months ago)
- Language: Makefile
- Homepage:
- Size: 14.6 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
_
_ __ ___ __ _ _ __| | _______ __
| '_ ` _ \ / _` | '__| |/ / _ \ \ / /
| | | | | | (_| | | | < (_) \ V /
|_| |_| |_|\__,_|_| |_|\_\___/ \_/
_ _
___ ___ _ __ ___ _ __ | | ___| |_ ___
/ __/ _ \| '_ ` _ \| '_ \| |/ _ \ __/ _ \
| (_| (_) | | | | | | |_) | | __/ || __/
\___\___/|_| |_| |_| .__/|_|\___|\__\___|
|_|markov-complete adds Markov chain text completion to GNU Readline, Vim, and
WeeChat.Installation
------------To install markov-complete, run:
$ make libs
$ sudo make install-libs
$ make
$ sudo make installA Vim plugin will be installed in /etc/vimrc/plugin. WeeChat will be installed
in /usr/local/bin/ with new default keybindings for markov-complete. You may
need to regenerate ~/.weechat/weechat.conf. You can also add the bindings
manually under the [key] section of your weechat.conf. See weechat/keys.conf.To patch readline once you've completed the above steps, run:
$ export LD_PRELOAD=/usr/local/lib/libreadline.so.7.0
Programs which dynamically link to readline will now use the patched version.
Generating the chain
--------------------You will need a "markov-chain" file in order to receive suggestions. Once
you've installed markov-complete, run (from this directory):$ cd markov/markov
$ cp corpus-text
$ cat corpus-text | ./generate.py
$ ./transpile.py chain.json > markov-chain
$ sudo cp markov-chain /usr/local/share/You can also set the environment variable MARKOV_CHAIN to specify a different
chain to use.Usage
-----Once you've typed a few words in a program that uses markov-complete, press
` (backtick) to autocomplete the next word. Press Ctrl+o to cycle through
Markov suggestions. Ctrl+Shift+` will enter a normal backtick.You can use `rlwrap` to enable markov-complete with any program that runs in
canonical mode (as opposed to raw mode).System requirements
-------------------markov-complete has been tested on Debian stretch (9.0). It may work on other
systems (possibly with some minor modifications).Dependencies
------------* gcc
* g++
* make
* cmake
* libncurses5-dev
* libcurl4-openssl-dev
* zlib1g-dev
* libgcrypt20-dev
* vim-nox