Skip to main content

A Python package providing Bhagavad Gita summaries and verses.

Project description

๐Ÿ“– gita

gita is a lightweight Python package providing access to summaries and verses from the Bhagavad Gita. It allows you to retrieve summaries, verses, chapter titles, and validate content programmatically.


๐ŸŒŸ Features

  • ๐Ÿ“š Get summary of a chapter
  • ๐Ÿ” Fetch a specific verse
  • ๐Ÿ“– Get all verses in a chapter
  • โœ… Validate chapters and verses
  • ๐Ÿท๏ธ Retrieve chapter titles

๐Ÿ“ฆ Installation

Clone this repository and install locally using:

git clone https://github.com/avarshvir/gita.git
cd gita

๐Ÿง  Usage

  1. Import the functions
from gita.utils import (
    get_summary,
    get_verse,
    get_all_verses,
    list_available_summaries,
    is_valid_chapter,
    is_valid_verse,
    get_chapter_title
)
  1. Get Chapter Summary
print(get_summary(1))

  1. Get a Specific Verse
print(get_verse(1, 1))
  1. Get All Verses from a Chapter
verses = get_all_verses(1)
for verse_number, verse_text in verses.items():
    print(f"{verse_number}: {verse_text}")
  1. List Available Summaries
print(list_available_summaries())
# Output: [1, 2, 3, 4]
  1. Validate Chapter or Verse
print(is_valid_chapter(1))  # True
print(is_valid_verse(1, 1))  # True or False
  1. Get Chapter Title
print(get_chapter_title(1))
# Output: Arjuna Vishada Yoga - The Yoga of Arjuna's Dejection

๐Ÿงช Running Tests

To run the unit tests, from the project root:

python -m unittest discover tests

๐Ÿ’ก Applications in ML/AI

The gita package can also serve as a semantic, philosophical, or ethical dataset for NLP and AI applications, including:
- ๐Ÿง˜โ€โ™‚๏ธ **Spiritual NLP:** Use summaries/verses for language modeling, text classification, or chatbot responses in spiritual/ethical domains.

- ๐Ÿ“Š **Topic Modeling:** Apply unsupervised learning (like LDA) to explore themes across chapters and verses.

- ๐Ÿค– **Conversational AI:** Integrate with chatbots or voice assistants to answer questions from the Gita.

- ๐Ÿง  **Fine-Tuning LLMs:** Fine-tune transformer models on Bhagavad Gita content for custom applications like question answering, summarization, or translation.

- ๐Ÿง˜ **Emotion Detection:** Train sentiment analysis models on Gita texts for understanding philosophical tone and emotion.

- ๐Ÿ“š **Text Embeddings:** Generate vector embeddings for each verse/summary to use in semantic search or recommender systems.

With a structured dataset and utilities, gita can be a powerful component in building ethically aware and spiritually aligned AI systems.

๐Ÿ“ Project Structure

gita/
โ”‚
โ”œโ”€โ”€ gita/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ utils.py
โ”‚   โ”œโ”€โ”€ data.py
โ”‚   โ””โ”€โ”€ constant.py
โ”‚
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ test_gita.py
โ”‚
โ”œโ”€โ”€ setup.py
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ MANIFEST.in

๐Ÿ“œ License

This project is licensed under the MIT License.

๐Ÿ™ Acknowledgements

  • Inspired by the sacred Bhagavad Gita
  • Developed with โค๏ธ by Arshvir

๐Ÿš€ Future Plans

  • Add all 18 chapter summaries
  • Include all verses from all chapters
  • Add audio and image support
  • Build a Streamlit/Flask interface
  • Extend NLP/ML capabilities for philosophical Q&A

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gita_py-0.1.2.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gita_py-0.1.2-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file gita_py-0.1.2.tar.gz.

File metadata

  • Download URL: gita_py-0.1.2.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for gita_py-0.1.2.tar.gz
Algorithm Hash digest
SHA256 050976e2d52a7ab4828dbfbb58e3f4f15517bf51f177f2ff7e15ef7a614d9554
MD5 cfefd9687e3465b4b5a1d718e85f6c48
BLAKE2b-256 236c7c7d83a1c99fb3c84b26b376fa1e28755068693b8b5d338cc7840a15c6dd

See more details on using hashes here.

File details

Details for the file gita_py-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gita_py-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for gita_py-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0de4d3ffa0cdea31b11ab9d714a3037c4b029d713a66b199cce89db4800c47f9
MD5 140f013e0cd2b5e76e39fa265896304f
BLAKE2b-256 555fa344e2ed4d3910042021e5ac380c995a30ea398f80885253c8ca38ab3f59

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page