A modern semantic translator tool designed to translate, compare, and evaluate the semantic similarity of Wikipedia content across different languages
# Navigate to backend
cd symmetry-unified-backend
# Quick start (recommended)
./start.sh
# This will:
# 1. Create virtual environment if needed
# 2. Install dependencies
# 3. Start server at http://127.0.0.1:8000Access interactive API documentation at: http://127.0.0.1:8000/docs
# Navigate to frontend
cd desktop-electron-frontend
# Install dependencies
yarn install
# Run development
yarn startProject Symmetry uses AI to accelerate Wikipedia's translation efforts in less-represented languages (< 1M articles) by analyzing semantic gaps between articles in different languages and providing targeted translations.
The application helps identify critical information lost or added during translation, useful for scenarios without internet access, such as medical documents, government communications, and NGO materials.
Currently focused on Wikipedia content; future expansion to other internet content and AI-powered translation for underrepresented languages.
- π Wikipedia Translation: Translate articles between languages
- π Semantic Comparison: Identify gaps and additions in translations using AI models
- π Gap Analysis: Detect missing/extra information with color-coded results
- π― Language Support: Focus on underrepresented languages
- π Structured Articles: Section-by-section content with citations and references
- π€ AI-Powered: LLM-based semantic understanding with models like LaBSE, XLM-RoBERTa
- π Analytics: Translation quality metrics and structural analysis
- π§ͺ Testing: Comprehensive test suite with 97% coverage
symmetry-project-202512/
βββ symmetry-unified-backend/ # FastAPI backend
β βββ app/
β β βββ ai/ # AI and ML components
β β β βββ semantic_comparison.py
β β β βββ llm_comparison.py
β β β βββ translations.py
β β βββ models/ # Pydantic v2 models
β β βββ routers/ # API route handlers
β β β βββ wiki_articles.py
β β β βββ structured_wiki.py
β β β βββ comparison.py
β β β βββ structural_analysis.py
β β βββ services/ # Business logic
β β β βββ article_parser.py
β β β βββ cache.py
β β β βββ wiki_utils.py
β β βββ prompts/ # LLM prompts
β β βββ main.py
β βββ tests/ # Test suite
β βββ requirements.txt
βββ desktop-electron-frontend/ # Electron + React frontend
β βββ src/
β β βββ components/ # React components
β β βββ services/ # API services
β β βββ models/ # TypeScript interfaces
β β βββ constants/ # Application constants
β β βββ context/ # React context
β β βββ pages/ # Page components
β βββ package.json
βββ README.md
- Operating System: Windows 10+, Ubuntu 20.04+, or macOS 10.15+
- Memory: Minimum 4GB RAM (8GB recommended)
- Storage: Minimum 2GB free space
- Internet Connection: Required for downloading dependencies
- Node.js: Version 18.0 or higher (LTS recommended)
- Python: Version 3.8 - 3.11 (NLP library requirements prevent 3.12)
- npm: Version 8.0 or higher (comes with Node.js)
- Git: Latest version
cd symmetry-unified-backend
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.template .env
# Edit .env as needed (LOG_LEVEL, FASTAPI_DEBUG)cd desktop-electron-frontend
# Install dependencies
yarn install
# Verify installation
yarn list --depth=0# Backend (with hot reload)
cd symmetry-unified-backend
source venv/bin/activate
uvicorn app.main:app --reload --host 127.0.0.1 --port 8000
# Frontend
cd desktop-electron-frontend
yarn start# Backend
cd symmetry-unified-backend
source venv/bin/activate
uvicorn app.main:app --host 127.0.0.1 --port 8000 --workers 4
# Frontend - package for distribution
cd desktop-electron-frontend
yarn packageThank you for your interest in contributing to Project Symmetry!
- Fork the repository
- Create a feature branch
- Install dependencies (see Installation Guide)
- Make your changes
- Run tests
- Submit a pull request
- Use PEP 8 style guidelines (88 char max line length)
- 4 spaces for indentation
- Type hints for all functions
- Docstrings for public functions
- PEP 8 naming conventions (snake_case)
- ESLint and Prettier configuration
- 2 spaces for indentation
- Components: PascalCase
- Services/Utilities: camelCase
- Types: PascalCase
cd symmetry-unified-backend
source venv/bin/activate
pytestTest coverage: 60 tests, 97% pass rate
cd desktop-electron-frontend
yarn test# Always pull latest changes
git fetch upstream
git rebase upstream/main
# Create feature branch
git checkout -b feature/your-feature-name
# Make changes and test
cd symmetry-unified-backend && pytest
cd ../desktop-electron-frontend && yarn test
# Commit and push
git add .
git commit -m "feat: description of changes"
git push origin feature/your-feature-name
# Create pull request
gh pr create --title "Feature Title" --body "Description..."- Code follows project standards
- Tests pass (backend and frontend)
- Documentation updated
- No breaking changes (unless documented)
- Commit messages follow conventional format
- Installation Guide - See Installation section above
- Contributing Guide - See Contributing section above
- Backend README - symmetry-unified-backend/README.md
- Frontend README - desktop-electron-frontend/README.md
Interactive API documentation available at http://127.0.0.1:8000/docs when backend is running.
GET /symmetry/v1/wiki/articles- Fetch Wikipedia articleGET /symmetry/v1/wiki/structured-article- Get structured article with sections, citations, referencesGET /symmetry/v1/wiki/structured-section- Get specific section with metadataGET /symmetry/v1/wiki/citation-analysis- Analyze citationsGET /symmetry/v1/wiki/reference-analysis- Analyze referencesGET /wiki_translate/source_article- Get translated article
POST /symmetry/v1/articles/compare- Compare two articles (traditional semantic)GET /symmetry/v1/comparison/llm- LLM comparison (GET)POST /symmetry/v1/comparison/llm- LLM comparison (POST)GET /symmetry/v1/comparison/semantic- Semantic comparison (GET)POST /symmetry/v1/comparison/semantic- Semantic comparison (POST)
GET /operations/{source_language}/{title}- Analyze article across 6 languages with quality scoring
Run all tests:
cd symmetry-unified-backend
pytestRun specific test file:
pytest tests/test_wiki_articles.pyRun with coverage:
pytest --cov=app --cov-report=htmlRun with verbose output:
pytest -v- Total Tests: 60
- Passing: 58 (97%)
- Test Categories: Wiki articles, comparison, structured wiki, structural analysis
- Test Time: ~0.07s
Sample article texts in tests/data/:
obama_A.txtandobama_B.txt: For comparison testsmissingno_en.txtandmissingno_fr.txt: Multi-language tests
- Week 1: Set up development environment and understand project structure
- Week 2: Study the existing codebase and run the application
- Week 3: Make small contributions (documentation, bug fixes)
- Week 4: Work on a feature under mentorship
- Week 5+: Contribute independently and help others
- π Translation Improvements: Add support for more languages, improve accuracy
- π Semantic Analysis: Enhance comparison algorithms, add more models
- π§ͺ Testing: Increase test coverage, add integration tests
- π₯οΈ UI/UX Improvements: Redesign components, add dark mode
- β‘ Performance: Optimize API responses, reduce memory usage
- π Documentation: Update API documentation, add tutorials
- π§ DevOps: Set up CI/CD pipeline, add monitoring
- π¨ Design: Update icons and logos, improve visual consistency
Edit start.sh and change python3 to python.
chmod +x start.shRebuild from scratch:
deactivate
rm -rf venv/
./start.shollama serve
# In another terminal:
ollama pull deepseek-r1# Clear cache and reinstall
yarn cache clean
rm -rf node_modules
yarn install# Find and kill process
lsof -ti:8000 | xargs kill -9
lsof -ti:3000 | xargs kill -9- Add exception in Windows Defender
- Allow connections through Windows Firewall
- Ensure Python and Node.js are in PATH
- Ensure OpenGL ES 2.0 or higher
- Fix permissions:
chmod +x start.sh
- Project Website: Project-Symmetry
- GitHub Issues: Report Issues
- Discussions: GitHub Discussions
- Design Resources: Figma UX
This project is licensed under the appropriate license. See the LICENSE file for details.
- Grey Box: Project development and maintenance
- Wikipedia: Source content and API access
- Open Source Community: Libraries and tools
Last Updated: December 2025
Version: 1.0.0
Maintainers: grey-box

