How dkim0048/tp10_ai works
Lexical Bridge AI provides three reading-support capabilities: age-based word difficulty estimates, an organized story library, and photo missions. The inference workflow runs through the FastAPI app to the word or image router, which prepares input, applies its model, and returns a result; the library clustering script produces a frontend-ready story catalog separately. The README documents the library’s filtering, topic and difficulty organization, while the excerpt shows its filtering and clustering implementation. Training and data-preparation scripts are intentionally omitted as they are not runtime components.
Main entry points: word_difficulty.py Word endpoints · image_classification.py Image endpoints · document_clustering.py Filter and combine stories · main.py FastAPI app
Components 18
Inference API
- FastAPI app
main.py
Word Difficulty
- Word endpoints
routers/word_difficulty.py - Word features
routers/word_difficulty.py - AoA prediction
routers/word_difficulty.py - Support category
routers/word_difficulty.py - Trained AoA model
word_difficulty_model/model/word_difficulty_model.json - Ridge training
word_difficulty_model/src/Ridge_Regression.py
Reading Library
- Story dataset
library_clustering/data/GlotStoryBook.csv - Filter and combine stories
library_clustering/src/document_clustering.py - Topic clustering
library_clustering/src/document_clustering.py - Difficulty levels
library_clustering/src/document_clustering.py - Story catalog
library_clustering/outputs/stories_final.json
Photo Missions
- Image endpoints
routers/image_classification.py - Image validation
routers/image_classification.py - Residual CNN
routers/image_classification.py - CNN checkpoint
photo_mission_image_classification/cnn/model/best_model.pth - Class and theme
routers/image_classification.py
Other components
- Parent / app client
Connections 17
- Parent / app client → FastAPI app: sends requests
README.md - FastAPI app → Word endpoints: mounts router
main.py - FastAPI app → Image endpoints: mounts router
main.py - Parent / app client → Story catalog: imports catalog
README.md - Word endpoints → Word features: extracts features
routers/word_difficulty.py - Word endpoints → AoA prediction: predicts AoA
routers/word_difficulty.py - Word endpoints → Support category: categorizes estimate
routers/word_difficulty.py - Word endpoints → Trained AoA model: loads artifact
routers/word_difficulty.py - Ridge training → Trained AoA model: exports model
README.md - Image endpoints → Image validation: validates upload
routers/image_classification.py - Image endpoints → Residual CNN: classifies image
routers/image_classification.py - Image endpoints → CNN checkpoint: loads checkpoint
routers/image_classification.py - Image endpoints → Class and theme: returns labels
routers/image_classification.py - Filter and combine stories → Story dataset: reads stories
library_clustering/src/document_clustering.py - Filter and combine stories → Topic clustering: clusters topics
library_clustering/src/document_clustering.py - Filter and combine stories → Difficulty levels: assigns levels
README.md - Filter and combine stories → Story catalog: exports catalog
README.md