jonathnmh12/Greek-Semantic-Analysis
Greek Semantic UI
Interactive UI for exploring Greek semantic embeddings from the Bible.
Overview
This application provides a Pygame-based interface for exploring semantic relationships in Biblical Greek text. Select any Greek word to see its closest semantic neighbors based on embedding similarity.
Project Structure
├── test_ui.py # Main Pygame application
├── models/ # Model files (symlink or copy from training repo)
└── pyproject.tomlSetup
uv syncUsage
python test_ui.pyStreamlit With Precomputed LDA Insights
Run the one-time artifact build after training or updating LDA outputs:
python build_lda_artifacts.pyThis writes runtime-ready files in data/greek-nt-sbert_v2/lda/:
verse_topics.csvtopic_summary.csvtopic_term_weights.csvartifacts_manifest.json
Then launch the Streamlit app:
streamlit run pages/streamlit_app.pyFor corpus-wide word retrieval, place your training text at greek_corpus.txt in the project root. The app extracts unique Greek word tokens from that file and uses them as similarity candidates.
How it works:
- Load a pre-trained Greek embedding model
- Generate embeddings for your corpus
- Click on Greek words to see semantically similar terms
- Cosine similarity determines ranking
Data
Currently loads verse data from John 1:1 for clickable UI text. Similarity candidates come from greek_corpus.txt (if present), plus visible Greek tokens in verse_data.
Models
Place trained models in the models/ directory. Currently configured to load from models/Greek_v2_Expanded.
Next Steps
- Load from entire Greek corpus for broader similarity matching
- Add filtering by part of speech
- Implement search functionality
- Support batch similarity comparisons
