How rohanmuralidharan/transync works
Transync is a local MBart-based multilingual translation tool. Its main workflow accepts text and source/target language codes, validates the codes, tokenizes the input, generates target-language tokens, and decodes translated text. The script also supports batch translation from a text file and listing supported languages. The excerpts show the model-loading and translation behavior, but omit parts of the CLI and batch implementation; the graph includes only relationships visible in excerpts or documented in the README.
Main entry points: transync_inference.py Single translation · config.json Local model files
Components 9
Other components
- CLI user
- CLI interface
transync_inference.py - Single translation
transync_inference.py - Batch translation
transync_inference.py - Model loader
transync_inference.py - MBart tokenizer
transync_inference.py - MBart model
transync_inference.py - Local model files
config.json - Translation output
Connections 15
- CLI user → CLI interface: provides text
README.md - CLI interface → Single translation: dispatches to
transync_inference.py - CLI interface → Batch translation: dispatches to
transync_inference.py - Single translation → Model loader: loads lazily
transync_inference.py - Batch translation → Model loader: loads lazily
transync_inference.py - Model loader → MBart model: loads model
transync_inference.py - Model loader → MBart tokenizer: loads tokenizer
transync_inference.py - MBart model → Local model files: reads local files
transync_inference.py - MBart tokenizer → Local model files: reads local files
transync_inference.py - Single translation → MBart tokenizer: encodes text
transync_inference.py - Single translation → MBart model: generates tokens
transync_inference.py - Single translation → Translation output: returns translation
transync_inference.py - Batch translation → MBart tokenizer: encodes batches
transync_inference.py - Batch translation → MBart model: generates batches
transync_inference.py - Batch translation → Translation output: returns translations
transync_inference.py