A modular, extensible system for parsing, semantic vectorization, graph modeling, memory, and natural narrative generation for Tamil sentences.
- Tamil Sentence Parsing: Tokenizes, splits, and morphologically analyzes Tamil sentences, supporting complex, multi-clause structures.
- Semantic Vectorization: Converts parsed clauses into semantic vectors, deduplicates tokens, handles implied actors/objects, and cleans up spurious tokens.
- Memory Graph: Stores semantic events, supports temporal layering, emotional encoding, and intent tagging.
- Narrative Generation: Produces fluent, context-aware Tamil narratives from the memory graph, handling questions, conditionals, imperatives, and more.
- Streamlit UI: Interactive web interface for input, visualization, and exploration.
<root>
│ README.md
│ test_full_pipeline.py # Command-line test script for full pipeline
│
├── tamil_sentence_parser/
│ └── parser.py # Tamil sentence parser (tokenizer, morphological analyzer, chunker)
│
├── semantic_vectorizer/
│ └── vectorizer.py # Semantic vector extraction and cleaning
│
├── memory_graph/
│ └── memory.py # Memory graph for storing semantic events
│
├── narrative_generator/
│ └── generator.py # Natural Tamil narrative generator
│
├── resonance_graph/
│ └── graph_engine.py # (Optional) Graph modeling for semantic resonance
│
├── ui/
│ └── app.py # Streamlit UI for interactive use
│
└── ... (other supporting files)
- tamil_sentence_parser/parser.py:
- Tokenizes and parses Tamil sentences, performs morphological analysis, and phrase chunking.
- semantic_vectorizer/vectorizer.py:
- Converts parsed output to semantic vectors, deduplicates, infers implied roles, and cleans up output.
- memory_graph/memory.py:
- Stores semantic events, tags clause types, supports narrative retrieval by time/emotion.
- narrative_generator/generator.py:
- Generates fluent, context-aware Tamil narratives, including questions, conditionals, and imperatives.
- ui/app.py:
- Streamlit-based web UI for input, visualization, and exploration.
- test_full_pipeline.py:
- Command-line script to test the full pipeline with sample sentences.
- Set up Python environment:
python -m venv .venv .venv\Scripts\activate # On Windows pip install -r requirements.txt - Run the full pipeline test:
This will parse, vectorize, store, and generate a narrative for sample Tamil sentences.
python test_full_pipeline.py
- Set up Python environment (if not already):
python -m venv .venv .venv\Scripts\activate # On Windows pip install -r requirements.txt - Start the Streamlit UI:
streamlit run ui/app.py - Open your browser to:
Enter Tamil sentences, view parsed structure, semantic vectors, memory graph, and generated narrative interactively.
http://localhost:8501
- The system is modular; you can use each component independently or as a pipeline.
- The parser and vectorizer are rule-based and can be extended for more linguistic features.
- The memory graph and narrative generator are designed for context-aware, multi-clause, and multi-event narratives.
- For best results, use modern Python 3.8+ and install all dependencies from
requirements.txt.
- Command line:
python test_full_pipeline.py - UI:
streamlit run ui/app.py
- [Ganesh Murugesan]
This project is licensed under the MIT License. See the LICENSE file for details.
MIT License
Copyright (c) 2025 Ganesh Murugesan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.