LinguaBridge is a machine learning-based English-to-Urdu translation model designed to bridge the language gap between the two languages. Built using logistic regression, this project aims to provide accurate and efficient translations for individuals and organizations seeking to communicate across linguistic and cultural boundaries.
To install the LinguaBridge project, follow these steps:
Clone the Repository
git clone https://github.com/mudassaralichouhan/lingua-bridge.git
Install Dependencies
pip install virtualenv
cd lingua-bridge/
python -m venv env
source env/bin/activate
echo $VIRTUAL_ENV
pip install -r requirements.txt
- Load the dataset:
python3.12 src/data_loader.py
$ python3.12 src/data_loader.py
Loading data...
Preprocessing data...
Dataset loaded successfully!
- Train the model:
python3.12 src/train_model.py
$ python3.12 src/train_model.py
Loading data...
Preprocessing data...
Vectorizing English texts...
Splitting data into training and testing sets...
Training logistic regression model...
Saving trained model to file...
Model trained successfully!
- Evaluate the model:
python3.12 src/evaluate_model.py
$ python3.12 src/evaluate_model.py
Loading data...
Preprocessing data...
Loading pre-trained model...
Evaluating model accuracy...
Model accuracy: 10.82%
Model evaluation completed successfully!
- Use the model for translation:
python3.12 src/translate.py
translate(["Hello, how are you?"])
$ python3.12 src/translate.py
Loading pre-trained model...
Making prediction on new sentence...
Printing predicted translation...
Predicted translation: آپ کیسے ہو؟
Translation completed successfully!
Contributions are welcome! If you'd like to contribute to the LinguaBridge project, please fork the repository and submit a pull request.
LinguaBridge is licensed under the MIT License.
Here's a sample requirements.txt
file:
pandas==2.2.2
datasets==2.21.0
scikit-learn==1.5.1
openpyxl==3.1.5
joblib==1.4.2