All Projects → aatxe → Markov

aatxe / Markov

Licence: cc0-1.0
A generic markov chain implementation in Rust.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Markov

Kenlg Reading
Reading list for knowledge-enhanced text generation, with a survey
Stars: ✭ 257 (+335.59%)
Mutual labels:  text-generation
Textgenrnn
Easily train your own text-generating neural network of any size and complexity on any text dataset with a few lines of code.
Stars: ✭ 4,584 (+7669.49%)
Mutual labels:  text-generation
Concise Ipython Notebooks For Deep Learning
Ipython Notebooks for solving problems like classification, segmentation, generation using latest Deep learning algorithms on different publicly available text and image data-sets.
Stars: ✭ 23 (-61.02%)
Mutual labels:  text-generation
Gpt2client
✍🏻 gpt2-client: Easy-to-use TensorFlow Wrapper for GPT-2 117M, 345M, 774M, and 1.5B Transformer Models 🤖 📝
Stars: ✭ 322 (+445.76%)
Mutual labels:  text-generation
Paperrobot
Code for PaperRobot: Incremental Draft Generation of Scientific Ideas
Stars: ✭ 372 (+530.51%)
Mutual labels:  text-generation
Leakgan
The codes of paper "Long Text Generation via Adversarial Training with Leaked Information" on AAAI 2018. Text generation using GAN and Hierarchical Reinforcement Learning.
Stars: ✭ 533 (+803.39%)
Mutual labels:  text-generation
Writing-editing-Network
Code for Paper Abstract Writing through Editing Mechanism
Stars: ✭ 72 (+22.03%)
Mutual labels:  text-generation
Gpt2 Ml
GPT2 for Multiple Languages, including pretrained models. GPT2 多语言支持, 15亿参数中文预训练模型
Stars: ✭ 1,066 (+1706.78%)
Mutual labels:  text-generation
Gpt2 Chinese
Chinese version of GPT2 training code, using BERT tokenizer.
Stars: ✭ 4,592 (+7683.05%)
Mutual labels:  text-generation
Grover
Code for Defending Against Neural Fake News, https://rowanzellers.com/grover/
Stars: ✭ 774 (+1211.86%)
Mutual labels:  text-generation
Tg Reading List
A text generation reading list maintained by Tsinghua Natural Language Processing Group.
Stars: ✭ 352 (+496.61%)
Mutual labels:  text-generation
Awesome Text Generation
A curated list of recent models of text generation and application
Stars: ✭ 370 (+527.12%)
Mutual labels:  text-generation
Cdial Gpt
A Large-scale Chinese Short-Text Conversation Dataset and Chinese pre-training dialog models
Stars: ✭ 596 (+910.17%)
Mutual labels:  text-generation
Accelerated Text
Accelerated Text is a no-code natural language generation platform. It will help you construct document plans which define how your data is converted to textual descriptions varying in wording and structure.
Stars: ✭ 256 (+333.9%)
Mutual labels:  text-generation
Describing a knowledge base
Code for Describing a Knowledge Base
Stars: ✭ 42 (-28.81%)
Mutual labels:  text-generation
Textbox
TextBox is an open-source library for building text generation system.
Stars: ✭ 257 (+335.59%)
Mutual labels:  text-generation
Textgan Pytorch
TextGAN is a PyTorch framework for Generative Adversarial Networks (GANs) based text generation models.
Stars: ✭ 479 (+711.86%)
Mutual labels:  text-generation
Market Reporter
Automatic Generation of Brief Summaries of Time-Series Data
Stars: ✭ 54 (-8.47%)
Mutual labels:  text-generation
Gpt2 French
GPT-2 French demo | Démo française de GPT-2
Stars: ✭ 47 (-20.34%)
Mutual labels:  text-generation
Texar Pytorch
Integrating the Best of TF into PyTorch, for Machine Learning, Natural Language Processing, and Text Generation. This is part of the CASL project: http://casl-project.ai/
Stars: ✭ 636 (+977.97%)
Mutual labels:  text-generation

markov Build Status Crates.io Docs Built with Spacemacs

A generic implementation of a Markov chain in Rust. It supports all types that implement Eq, Hash, and Clone, and has some specific helpers for working with String as text generation is the most likely use case. You can find up-to-date, ready-to-use documentation online on docs.rs.

Note: markov is in passive maintenance mode. It should work well for its intended use case (largely textual generation, especially in chat bots and the like), but will likely not grow to any further use cases. If it does not meet your needs in a broad sense, you should likely fork it or develop a more purpose-built library. Nevertheless, bug reports will still be triaged and fixed.

Examples

With Strings:

extern crate markov;

use markov::Chain;

fn main() {
    let mut chain = Chain::new();
    chain.feed_str("I like cats and I like dogs.");
    println!("{:?}", chain.generate_str());
}

With integers:

extern crate markov;

use markov::Chain;

fn main() {
    let mut chain = Chain::new();
    chain.feed(vec![1u8, 2, 3, 5]).feed([3u8, 9, 2]);
    println!("{:?}", chain.generate());
}

Chains have iterators (both infinite and sized!):

extern crate markov;

use markov::Chain;

fn main() {
    let mut chain = Chain::new();
    chain.feed_str("I like cats and I like dogs.");
    for line in chain.iter_for(5) {
        println!("{:?}", line);
    }
}

Chains can be higher-order:

extern crate markov;

use markov::Chain;

fn main() {
    let mut chain = Chain::of_order(2);
    chain.feed_str("I like cats and I like dogs.");
    for line in chain.iter_for(5) {
        println!("{:?}", line);
    }
}

Contributing

Contributions to this library would be immensely appreciated. It should be noted that as this is a public domain project, any contributions will thus be released into the public domain as well.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].