GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - qiray/MarkovTextGenerator: Markov text generator

BranchesTags
Open more actions menu

Latest commit

 

History

41 Commits
41 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.sh
build.sh
 
 
database.py
database.py
 
 
hook-nltk.py
hook-nltk.py
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 
secrets.py
secrets.py
 
 
text.py
text.py
 
 
tokens.py
tokens.py
 
 

Repository files navigation

Markov Text Generator

Text generator using Markov chain to generate pseudo meaningful text.

Requirements

This program uses Python 3 and some extra libraries:

  • argparse to parse command line arguments;

  • NLTK to parse text files and sentences;

  • pyinstaller for optional build project as binary release.

Installation

You should install requirements to use this program: python3, pip3 and some additional python libraries. There is requirements.txt file with libraries' list.

Usage

python3 main.py [OPTIONS]

-h, --help            show this help message and exit
-f FILE, --parse FILE
                      Parse text file and save it in database
-n NUMBER, --number NUMBER
                      Set size of token for text parsing (default = 3)
-g, --generate        Generate text sequence
-v, --version         Show version
--differentsource     Enable this option to generate texts from different
                      sources only

For example, to parse text file file.txt and add it's content to database:

python3 main.py -f file.txt

To generate a sentence using existing database run:

python3 main.py -g

### License
This program uses GNU GPL3. For more information see the LICENSE file.

About

Markov text generator

Topics

markov-chainpythonpython3text-generationtext-generator

Resources

Readme
GPL-3.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.