📖 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
Metadata
Release files for gita-py 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gita_py-0.1.2.tar.gz | 19.3 kB | Without provenance | Details for gita_py-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gita_py-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for gita_py-0.1.2-py3-none-any.whl |
Total release size: 36.9 kB
Release files / gita_py-0.1.2.tar.gz
| Download URL | gita_py-0.1.2.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
050976e2d52a7ab4828dbfbb58e3f4f15517bf51f177f2ff7e15ef7a614d9554
|
|
BLAKE2b-256 checksum How to use checksums |
236c7c7d83a1c99fb3c84b26b376fa1e28755068693b8b5d338cc7840a15c6dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.4
|
Release files / gita_py-0.1.2-py3-none-any.whl
| Download URL | gita_py-0.1.2-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0de4d3ffa0cdea31b11ab9d714a3037c4b029d713a66b199cce89db4800c47f9
|
|
BLAKE2b-256 checksum How to use checksums |
555fa344e2ed4d3910042021e5ac380c995a30ea398f80885253c8ca38ab3f59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.4
|
Security for gita-py 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.