{"id":26274108,"url":"https://github.com/absarraashid3/translodep2c","last_synced_at":"2026-04-13T09:31:15.805Z","repository":{"id":279793054,"uuid":"939990236","full_name":"AbsarRaashid3/TranslodeP2C","owner":"AbsarRaashid3","description":"TranslodeP2C is an AI-powered pseudocode-to-C++ transformer, built with a seq2seq model. It preprocesses structured pseudocode, trains on paired datasets, and generates efficient C++ code. With an intuitive Streamlit UI, TranslodeP2C enables seamless and intelligent code synthesis from natural language descriptions. 🚀","archived":false,"fork":false,"pushed_at":"2025-03-23T12:33:30.000Z","size":9492,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-01T05:46:30.032Z","etag":null,"topics":["artificial-intelligence","genrative-ai","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbsarRaashid3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-27T12:45:03.000Z","updated_at":"2025-03-23T12:33:33.000Z","dependencies_parsed_at":"2025-03-02T11:27:53.390Z","dependency_job_id":null,"html_url":"https://github.com/AbsarRaashid3/TranslodeP2C","commit_stats":null,"previous_names":["absarraashid3/pseudo_to_cpp_generator","absarraashid3/translodep2c"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AbsarRaashid3/TranslodeP2C","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsarRaashid3%2FTranslodeP2C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsarRaashid3%2FTranslodeP2C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsarRaashid3%2FTranslodeP2C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsarRaashid3%2FTranslodeP2C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbsarRaashid3","download_url":"https://codeload.github.com/AbsarRaashid3/TranslodeP2C/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsarRaashid3%2FTranslodeP2C/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","genrative-ai","machine-learning"],"created_at":"2025-03-14T09:18:07.291Z","updated_at":"2026-04-13T09:31:15.789Z","avatar_url":"https://github.com/AbsarRaashid3.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TranslodeP2C \u003cbr\u003e\n\n## Overview \u003cbr\u003e\n\nTranslodeP2C is an AI-powered pseudocode-to-C++ conversion system. \u003cbr\u003e\nLeveraging a Transformer-based seq2seq model,  \u003cbr\u003e\nit translates pseudocode descriptions into structured C++ programs. \u003cbr\u003e\nThe project includes preprocessing, vocabulary building, training, \u003cbr\u003e\nand inference, with an interactive Streamlit UI. \u003cbr\u003e\n\n## Features \n* Transformer-based sequence-to-sequence model for code generation. \u003cbr\u003e\n* Converts pseudocode to C++ using deep learning. \u003cbr\u003e\n* Preprocessing and vocabulary management for structured learning. \u003cbr\u003e\n* Training pipeline with customizable hyperparameters. \u003cbr\u003e\n* Inference system with greedy decoding. \u003cbr\u003e\n* Streamlit-based web UI for user-friendly interactions. \u003cbr\u003e\n\n## Installation \n\n### Prerequisites\n\nEnsure you have the following installed:\n* Python 3.8+ \u003cbr\u003e\n* PyTorch \u003cbr\u003e\n* Streamlit \u003cbr\u003e\n* tqdm \u003cbr\u003e\n\n\n## Setup\n1. Clone the repository:\n   git clone https://github.com/absarraashid3/translodep2c.git\n   cd translodep2c\n2. Install dependencies:\n   pip install -r requirements.txt\n3. Prepare your dataset and place it in data/train/split/.\n\n   \n## Usage\n\n### Preprocessing\nConvert TSV trInaining data into paired pseudocode-code format:\n```\n python src/preprocess.py --input_tsv \"C:\\Projects\\GenAi\\data\\train\\split\\spoc-train-train.tsv\" --output_txt \"C:\\Projects\\GenAi\\data\\train_pairs.txt\" \n```\n### Building Vocabulary\nGenerate vocabulary pickle files from training pairs:\n```\n python src/vocab.py --pairs_file \"C:\\Projects\\GenAi\\data\\train_pairs.txt\" --src_vocab_file \"src/src_vocab.pkl\" --tgt_vocab_file \"src/tgt_vocab.pkl\" \n```\n## Training the Model\nTrain the Transformer model for pseudocode-to-C++ conversion:\n```\n python src/train.py --pairs_file \"C:\\Projects\\GenAi\\data\\train_pairs.txt\" --src_vocab_file \"src/src_vocab.pkl\" --tgt_vocab_file \"src/tgt_vocab.pkl\" --epochs 10 --batch_size 8 \n```\n## Inference\nGenerate C++ code from input pseudocode:\n```\n python src/infer.py --model_checkpoint transformer_seq2seq.pt --src_vocab_file \"src/src_vocab.pkl\" --tgt_vocab_file \"src/tgt_vocab.pkl\" --pseudocode \"read n print factorial of n\" \n```\n## Web Application\nLaunch the Streamlit UI:\n```\n streamlit run src/app.py \n```\nEnter pseudocode and get auto-generated C++ code!\n\n## Future Enhancements\n* Implement beam search decoding for better predictions.\n* Fine-tune with more programming languages.\n* Optimize the model for faster inference.\n\n# 🚀 Transform pseudocode into real C++ with TranslodeP2C!\n\n\n![1](https://github.com/user-attachments/assets/996f509a-a77e-458e-a17b-d584c4bfada4)\n![2](https://github.com/user-attachments/assets/77483e06-6686-4fd1-9e08-b58ae5547b19)\n![3](https://github.com/user-attachments/assets/abd103cc-14db-4d4a-be9e-adcb0c9f13ba)\n![4](https://github.com/user-attachments/assets/54e100f7-2a13-4834-a623-a00d84acc226)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabsarraashid3%2Ftranslodep2c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabsarraashid3%2Ftranslodep2c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabsarraashid3%2Ftranslodep2c/lists"}