Git Product home page Git Product logo

mantra-generator's Introduction

mantra-generator

Part of the Part of the UNSONG re-narration project, UNCHANT

Generates mantras in Sanskrit, allowing you to discover secret mantras.

Those are not just words taken in random order: by using Markov chains we extract regular patterns from existing set of mantras. You can generate mantras to a specified deity (Shiva, Kali, etc) or combine them to reach the desired effect.

It's basically just a wrapper over markovify with predefined text corpora and optional Devanagari romanization.

Requirements

Python 3.x

Installation

Install dependencies:

  • pip install indic-transliteration
  • pip install markovify

Running from the command line

Run:

python generate.py

This will generate and print a secret mantra with default parameters. To see all possible arguments, run python generate.py --help

If mantra generation is not possible with these arguments, the program will tell you about that.

Extending default mantra corpora

Source corpora is kept in the corpus directory in deity.txt files. Each mantra must be written in Devanagari Sanskrit and be each on a separate line. So you can add new mantras to existing deity files as well as add new files.

Please contact me directly at [email protected] to add new mantras and deities to the project.

mantra-generator's People

Contributors

yakninja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rebbeli

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.