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
- 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
)
- Get Chapter Summary
print(get_summary(1))
- Get a Specific Verse
print(get_verse(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}")
- List Available Summaries
print(list_available_summaries())
# Output: [1, 2, 3, 4]
- Validate Chapter or Verse
print(is_valid_chapter(1)) # True
print(is_valid_verse(1, 1)) # True or False
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
050976e2d52a7ab4828dbfbb58e3f4f15517bf51f177f2ff7e15ef7a614d9554
|
|
| MD5 |
cfefd9687e3465b4b5a1d718e85f6c48
|
|
| BLAKE2b-256 |
236c7c7d83a1c99fb3c84b26b376fa1e28755068693b8b5d338cc7840a15c6dd
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0de4d3ffa0cdea31b11ab9d714a3037c4b029d713a66b199cce89db4800c47f9
|
|
| MD5 |
140f013e0cd2b5e76e39fa265896304f
|
|
| BLAKE2b-256 |
555fa344e2ed4d3910042021e5ac380c995a30ea398f80885253c8ca38ab3f59
|