Automatic Realtime Machine Translation
On the battlefield, a lot of communication happens through radio channels. Though armies have the technology to intercept enemy radio channels, it is tough to detect and translate the voices in real-time if it is in another language. For this cause, my friends and I developed a language-agnostic NLP model that translates an input sentence to a set of output languages to assist in easy comprehension. This project got us the runner-up position in the AI Track of the Defence Innovation Challenge, Shaastra Techfest, IIT Madras.
We implemented a Seq-to-Seq Model (Encoder-Decoder-Attention Mechanism) that could translate short sentences in Sinhalese, Persian, Chinese (simplified), and Indonesian to English and vice versa.
Technical Details
- Language: Python
- API: Tensorflow
- Model Architecture:
- Encoder: Single Layer Gated Recurrent Unit (GRU)
- Attention: bahdanau Style
- Decoder: Single Layer GRU
- Optimiser: Adam
- Loss Function: Sparse Categorical Entropy
- Word Embeddings:
- Library: Fasttext
- Dimension: 300
Results
Here is a set of randomly chosen sentences:
# English to Indonesian
translate('My friend is a good person')
Input: <start> my friend is a good person <end>
Predicted translation: teman teman yang bagus
translate('Soldiers fought day and night.')
Input: <start> soldiers fought day and night <end>
Predicted translation: para prajurit hari dan malam
# Persian to English
translate('او یک دختر است')
Input: <start> او یک دختر است <end>
Predicted translation: he s a daughter <end>
translate('او بعد از شام تحصیل می کند')
Input: <start> او بعد از شام تحصیل می کند <end>
Predicted translation: he studies after dinner <end>
# Sinhalese to English
translate('කරුණාකර මට කෑගහන්න එපා')
Input: <start> කරුණාකර මට කෑග න්න එපා <end>
Predicted translation: please don t interrupt me <end>
translate('මත්ද්රව්ය හොඳටම බලනවා')
Input: <start> මත්ද්රව්ය ොඳටම බලනවා <end>
Predicted translation: don t be the prisoner <end>
# Chinese to English
translate('他很棒')
Input: <start> 他 很棒 <end>
Predicted translation: he is wonderful <end>
translate('请让我唱歌')
Input: <start> 请 让 我 唱歌 <end>
Predicted translation: please let me go home <end>