![Revisit consent button](../images/body-df29beacd7496220cc94.svg)
We value your privacy
We use cookies to enhance your browsing experience, serve personalised ads or content, and analyse our traffic. By clicking "Accept All", you consent to our use of cookies.
Customise Reject All Accept All
Customise Consent Preferences ![](../images/body-2159bb67f3de8ad870eb.svg)
We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.
The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... Show more
NecessaryAlways Active
Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.
  * Cookie
BCTempID
  * Duration
10 minutes
  * Description
No description available.


  * Cookie
__cf_bm
  * Duration
1 hour
  * Description
This cookie, set by Cloudflare, is used to support Cloudflare Bot Management. 


  * Cookie
AWSALBCORS
  * Duration
7 days
  * Description
Amazon Web Services set this cookie for load balancing.


  * Cookie
_cfuvid
  * Duration
session
  * Description
Cloudflare sets this cookie to track users across sessions to optimize user experience by maintaining session consistency and providing personalized services


  * Cookie
li_gc
  * Duration
6 months
  * Description
Linkedin set this cookie for storing visitor's consent regarding using cookies for non-essential purposes.


  * Cookie
__hssrc
  * Duration
session
  * Description
This cookie is set by Hubspot whenever it changes the session cookie. The __hssrc cookie set to 1 indicates that the user has restarted the browser, and if the cookie does not exist, it is assumed to be a new session.


  * Cookie
__hssc
  * Duration
1 hour
  * Description
HubSpot sets this cookie to keep track of sessions and to determine if HubSpot should increment the session number and timestamps in the __hstc cookie.


  * Cookie
wpEmojiSettingsSupports
  * Duration
session
  * Description
WordPress sets this cookie when a user interacts with emojis on a WordPress site. It helps determine if the user's browser can display emojis properly.


  * Cookie
BCSessionID
  * Duration
1 year 1 month 4 days
  * Description
Blueconic sets this cookie as a unique identifier for the BlueConic profile.


  * Cookie
_octo
  * Duration
1 year
  * Description
No description available.


  * Cookie
logged_in
  * Duration
1 year
  * Description
No description available.


  * Cookie
__Secure-YEC
  * Duration
past
  * Description
YouTube sets this cookie to stores the user's video player preferences using embedded YouTube video


  * Cookie
__eoi
  * Duration
6 months
  * Description
Description is currently not available.


  * Cookie
AWSALBTGCORS
  * Duration
7 days
  * Description
No description available.


  * Cookie
login-status-p
  * Duration
past
  * Description
Description is currently not available.


  * Cookie
AWSALBTG
  * Duration
7 days
  * Description
No description available.


  * Cookie
csrf_token
  * Duration
session
  * Description
No description available.


  * Cookie
token_v2
  * Duration
1 day
  * Description
Description is currently not available.


  * Cookie
D
  * Duration
1 year
  * Description
Description is currently not available.


  * Cookie
PHPSESSID
  * Duration
session
  * Description
This cookie is native to PHP applications. The cookie stores and identifies a user's unique session ID to manage user sessions on the website. The cookie is a session cookie and will be deleted when all the browser windows are closed.


  * Cookie
VISITOR_PRIVACY_METADATA
  * Duration
6 months
  * Description
YouTube sets this cookie to store the user's cookie consent state for the current domain. 


  * Cookie
cookietest
  * Duration
session
  * Description
The cookietest cookie is typically used to determine whether the user's browser accepts cookies, essential for website functionality and user experience.


  * Cookie
__Host-airtable-session
  * Duration
1 year
  * Description
This cookie is used to enable us to integrate the services of Airtable.


  * Cookie
__Host-airtable-session.sig
  * Duration
1 year
  * Description
This cookie is used to enable us to integrate the services of Airtable.


  * Cookie
m
  * Duration
1 year 1 month 4 days
  * Description
Stripe sets this cookie for fraud prevention purposes. It identifies the device used to access the website, allowing the website to be formatted accordingly.


  * Cookie
BIGipServer*
  * Duration
session
  * Description
Marketo sets this cookie to collect information about the user's online activity and build a profile about their interests to provide advertisements relevant to the user. 


  * Cookie
__cfruid
  * Duration
session
  * Description
Cloudflare sets this cookie to identify trusted web traffic.


  * Cookie
_GRECAPTCHA
  * Duration
6 months
  * Description
Google Recaptcha service sets this cookie to identify bots to protect the website against malicious spam attacks.


  * Cookie
__Secure-YNID
  * Duration
6 months
  * Description
Google cookie used to protect user security and prevent fraud, especially during the login process.


  * Cookie
cookieyes-consent
  * Duration
1 year
  * Description
CookieYes sets this cookie to remember users' consent preferences so that their preferences are respected on subsequent visits to this site. It does not collect or store any personal information about the site visitors.


Functional
Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.
  * Cookie
lidc
  * Duration
1 day
  * Description
LinkedIn sets the lidc cookie to facilitate data center selection.


  * Cookie
brw
  * Duration
1 year
  * Description
No description available.


  * Cookie
brwConsent
  * Duration
5 minutes
  * Description
Description is currently not available.


  * Cookie
WMF-Uniq
  * Duration
1 year
  * Description
Description is currently not available.


  * Cookie
loom_anon_comment
  * Duration
1 year
  * Description
No description available.


  * Cookie
loom_referral_video
  * Duration
session
  * Description
Description is currently not available.


  * Cookie
VISITOR_INFO1_LIVE
  * Duration
6 months
  * Description
A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.


  * Cookie
yt-remote-connected-devices
  * Duration
Never Expires
  * Description
YouTube sets this cookie to store the user's video preferences using embedded YouTube videos.


  * Cookie
ytidb::LAST_RESULT_ENTRY_KEY
  * Duration
Never Expires
  * Description
The cookie ytidb::LAST_RESULT_ENTRY_KEY is used by YouTube to store the last search result entry that was clicked by the user. This information is used to improve the user experience by providing more relevant search results in the future.


  * Cookie
yt-remote-device-id
  * Duration
Never Expires
  * Description
YouTube sets this cookie to store the user's video preferences using embedded YouTube videos.


  * Cookie
yt-remote-session-name
  * Duration
session
  * Description
The yt-remote-session-name cookie is used by YouTube to store the user's video player preferences using embedded YouTube video.


  * Cookie
yt-remote-fast-check-period
  * Duration
session
  * Description
The yt-remote-fast-check-period cookie is used by YouTube to store the user's video player preferences for embedded YouTube videos.


  * Cookie
yt-remote-session-app
  * Duration
session
  * Description
The yt-remote-session-app cookie is used by YouTube to store user preferences and information about the interface of the embedded YouTube video player.


  * Cookie
yt-remote-cast-available
  * Duration
session
  * Description
The yt-remote-cast-available cookie is used to store the user's preferences regarding whether casting is available on their YouTube video player.


  * Cookie
yt-remote-cast-installed
  * Duration
session
  * Description
The yt-remote-cast-installed cookie is used to store the user's video player preferences using embedded YouTube video.


  * Cookie
cp_session
  * Duration
3 months
  * Description
Codepen sets this cookie for Help systems found in the website.


  * Cookie
loid
  * Duration
1 year 1 month 4 days
  * Description
This cookie is set by the Reddit. The cookie enables the sharing of content from the website onto the social media platform.


Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.
  * Cookie
__hstc
  * Duration
6 months
  * Description
Hubspot set this main cookie for tracking visitors. It contains the domain, initial timestamp (first visit), last timestamp (last visit), current timestamp (this visit), and session number (increments for each subsequent session).


  * Cookie
hubspotutk
  * Duration
6 months
  * Description
HubSpot sets this cookie to keep track of the visitors to the website. This cookie is passed to HubSpot on form submission and used when deduplicating contacts.


  * Cookie
_ga
  * Duration
1 year 1 month 4 days
  * Description
Google Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors.


  * Cookie
_ga_*
  * Duration
1 year 1 month 4 days
  * Description
Google Analytics sets this cookie to store and count page views.


  * Cookie
__Host-psifi.analyticsTrace
  * Duration
6 hours
  * Description
Description is currently not available.


  * Cookie
__Host-psifi.analyticsTraceV2
  * Duration
6 hours
  * Description
Description is currently not available.


  * Cookie
_gh_sess
  * Duration
session
  * Description
GitHub sets this cookie for temporary application and framework state between pages like what step the user is on in a multiple step form.


  * Cookie
YSC
  * Duration
session
  * Description
YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.


  * Cookie
ajs_anonymous_id
  * Duration
1 year
  * Description
This cookie is set by Segment to count the number of people who visit a certain site by tracking if they have visited before.


  * Cookie
vuid
  * Duration
1 year 1 month 4 days
  * Description
Vimeo installs this cookie to collect tracking information by setting a unique ID to embed videos on the website. 


Performance
Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.
  * Cookie
AWSALB
  * Duration
7 days
  * Description
AWSALB is an application load balancer cookie set by Amazon Web Services to map the session to the target.


  * Cookie
acq
  * Duration
past
  * Description
Description is currently not available.


  * Cookie
acq.sig
  * Duration
past
  * Description
Description is currently not available.


  * Cookie
ptc
  * Duration
2 years
  * Description
No description available.


Advertisement
Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.
  * Cookie
muc_ads
  * Duration
1 year 1 month 4 days
  * Description
Twitter sets this cookie to collect user behaviour and interaction data to optimize the website.


  * Cookie
guest_id_marketing
  * Duration
1 year 1 month 4 days
  * Description
Twitter sets this cookie to identify and track the website visitor.


  * Cookie
guest_id_ads
  * Duration
1 year 1 month 4 days
  * Description
Twitter sets this cookie to identify and track the website visitor.


  * Cookie
personalization_id
  * Duration
1 year 1 month 4 days
  * Description
Twitter sets this cookie to integrate and share features for social media and also store information about how the user uses the website, for tracking and targeting.


  * Cookie
guest_id
  * Duration
1 year 1 month 4 days
  * Description
Twitter sets this cookie to identify and track the website visitor. It registers if a user is signed in to the Twitter platform and collects information about ad preferences.


  * Cookie
bcookie
  * Duration
1 year
  * Description
LinkedIn sets this cookie from LinkedIn share buttons and ad tags to recognize browser IDs.


  * Cookie
__Secure-ROLLOUT_TOKEN
  * Duration
6 months
  * Description
YouTube sets this cookie to manage feature rollout and experimentation. It helps Google control which new features or interface changes are shown to users as part of testing and staged rollouts, ensuring consistent experience for a given user during an experiment.


  * Cookie
yt.innertube::nextId
  * Duration
Never Expires
  * Description
YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen.


  * Cookie
yt.innertube::requests
  * Duration
Never Expires
  * Description
YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen.


  * Cookie
session_tracker
  * Duration
session
  * Description
This cookie is set by the Reddit. This cookie is used to identify trusted web traffic. It also helps in adverstising on the website.


  * Cookie
edgebucket
  * Duration
session
  * Description
Reddit sets this cookie to save the information about a log-on Reddit user, for the purpose of advertisement recommendations and updating the content.


  * Cookie
did
  * Duration
1 year
  * Description
Arbor sets this cookie to show targeted ads to site visitors.This cookie expires after 2 months or 1 year.


Uncategorised
Other uncategorised cookies are those that are being analysed and have not been classified into a category as yet.
No cookies to display.
Reject All Save My Preferences Accept All
Toggle Search[](https://towardsdatascience.com/)Toggle Mobile Navigation
[](https://towardsdatascience.com/)
Publish AI, ML & data-science insights to a global community of data professionals.
Sign in[Submit an Article](https://write.insightmediagroup.io)
[Latest](https://towardsdatascience.com/latest/)[Editor's Picks](https://towardsdatascience.com/tag/editors-pick/)[Newsletter](https://towardsdatascience.com/tag/the-variable/)[ShipAI](https://towardsdatascience.com/shipai/)
* * *
[Write For TDS](https://towardsdatascience.com/submissions/)
[LinkedIn](https://www.linkedin.com/company/towards-data-science/)[X](https://x.com/TDataScience)Toggle Search
[Data Science](https://towardsdatascience.com/category/data-science/)
# Lost In (Machine) Translation
Small batch machine translation of speeches and news articles (English-to-Chinese and vice versa) in under-30 lines of code.
[Chua Chin Hon](https://towardsdatascience.com/author/chuachinhon/)
August 24, 20208 min read
![Illustration: Chua Chin Hon](../images/000.jpeg)
Illustration: Chua Chin Hon
### Small batch machine translation of speeches and news articles (English to Chinese/Tamil, and vice versa) in under-30 lines of code, using Hugging Face's version of MarianMT and Facebook's Fairseq.
_**UPDATED Dec 30, 2020**_ :
Facebook [recently released](https://github.com/pytorch/fairseq/tree/master/examples/wmt20) recently released its machine translation models for English to Tamil (and vice versa), and I was eager to give it a try since Tamil is among the most under-served languages in machine learning, and related language pairs are pretty hard to come by.
The new notebooks and toy datasets are in the [repo](https://github.com/chuachinhon/practical_nlp). Or, go [[here](https://github.com/chuachinhon/practical_nlp/blob/master/notebooks/4.4_tamil_to_english_fairseq.ipynb)](https://github.com/chuachinhon/practical_nlp/blob/master/notebooks/4.3_english_to_tamil_fairseq.ipynb) for the demo for English-to-Tamil translation of speeches and news articles, and here for Tamil-to-English translation of the same type of material.
There are obvious problems with the _quality_ of the translation in some parts. But machine translation gets about 70–80% of the job done, in my view, allowing human translators to work more efficiently.
Learn this step by step with the interactive [AI and Data Scientist](https://roadmap.sh/ai-data-scientist) roadmap.
![Sample output for English-to-Tamil translation of news articles.](../images/001.png)
Sample output for English-to-Tamil translation of news articles.
* * *
Machine translation doesn't generate as much excitement as other emerging areas in NLP these days, in part because consumer-facing services like [Google Translate](https://translate.google.com/) have been around since [April 2006](https://en.wikipedia.org/wiki/Google_Translate).
But recent advances, particularly the work by [Hugging Face](https://huggingface.co/) in making transformer models more accessible and easy to use, have opened up interesting new possibilities for those looking to translate more than just piecemeal sentences or articles.
For one, small batch translation in multiple languages can now be run pretty efficiently from a desktop or laptop without having to subscribe to an [expensive service](https://azure.microsoft.com/en-us/pricing/details/cognitive-services/translator/). No doubt the translated works by [neural machine translation](https://www.microsoft.com/en-us/translator/business/machine-translation/#nnt) models are not (yet) as artful or precise as those by a skilled human translator, but they get 60% or more of the job done, in my view.
This could be a huge time saver for workplaces that run on short deadlines, such as newsrooms, to say nothing of the scarcity of skilled human translators.
Over [three short notebooks](https://github.com/chuachinhon/practical_nlp), I'll outline a simple workflow for using [Hugging Face's version of MarianMT](https://huggingface.co/transformers/model_doc/marian.html) to batch translate:
  * [English speeches of varying lengths to Chinese](https://github.com/chuachinhon/practical_nlp/blob/master/notebooks/4.0_english_to_chinese_translate.ipynb)
  * [English news stories on Covid-19 (under 500 words) to Chinese](https://github.com/chuachinhon/practical_nlp/blob/master/notebooks/4.1_english_to_chinese_news.ipynb)
  * [Chinese speeches of varying lengths to English](https://github.com/chuachinhon/practical_nlp/blob/master/notebooks/4.2_chinese_to_english_translate.ipynb).


![Download the output files here](../images/002.png)
Download the output files [here](https://www.dropbox.com/sh/q4vy8recuib4rs9/AACagocH9mkrdj0yKKqrO0vaa)
* * *
## 1. DATA SET AND TRANSLATED OUTPUT
There are two datasets for this post. The [first](https://github.com/chuachinhon/practical_nlp/blob/master/data/translation_speeches.csv) comprises 11 speeches in four languages (English, Malay, Chinese, and Tamil) taken from the website of the [Singapore Prime Minister's Office](https://www.pmo.gov.sg/). The [second dataset](https://github.com/chuachinhon/practical_nlp/blob/master/data/cna_sample.csv) consists of five random English news stories on Covid-19 published on Singapore news outlet's [CNA's website](https://www.channelnewsasia.com/) in March 2020.
Results of the output CSV files with the machine translated text and original copy can be downloaded [here](https://www.dropbox.com/sh/q4vy8recuib4rs9/AACagocH9mkrdj0yKKqrO0vaa).
At the time of writing, you can tap over 1,300 open source models on [Hugging Face's model hub](https://huggingface.co/Helsinki-NLP?utm_campaign=Hugging%2BFace&utm_medium=email&utm_source=Hugging_Face_1) for machine translation. As no MarianMT models for English-Malay and English-Tamil (and vice versa) have been released to date, this series of notebooks will not deal with these two languages for now. I'll revisit them as and when the models are available.
I won't dive into the technical details behind machine translation. Broad details of Hugging Face's version of MarianMT can be found [here](https://huggingface.co/transformers/model_doc/marian.html), while those curious about the history of machine translation can start with this fairly recent [article](https://medium.com/huggingface/a-brief-history-of-machine-translation-paradigms-d5c09d8a5b7e).
## 2A. ENGLISH-TO-CHINESE MACHINE TRANSLATION OF 3 SPEECHES
The three English speeches I picked for machine translation into Chinese range from 1,352 to 1,750 words. They are not highly technical but cover a wide enough range of topics - from Covid-19 to Singapore politics and domestic concerns - to stretch the model's capability.
The text was lightly cleaned. For best results, the sentences were translated one at a time (you'll notice a significant drop in translation quality if you run the entire speech through the model without tokenizing at the sentence level). [The notebook](https://github.com/chuachinhon/practical_nlp/blob/master/notebooks/4.0_english_to_chinese_translate.ipynb) took just minutes to run on my late-2015 iMac (32Gb RAM) - but may vary depending on your hardware.
![Batch machine translation made easy, thanks to Hugging Face&#039;s implementation of MarianMT](../images/003.jpeg)
Batch machine translation made easy, thanks to Hugging Face's implementation of MarianMT
Some of the familiar problems with machine translation are apparent right away, particularly with the literal translation of certain terms, phrases and idioms.
May Day, for instance, was translated as "五月节" (literally May Festival) instead of 劳动节. A reference to "rugged people" was translated as "崎岖不平的人", which would literally mean "uneven people". Clearly the machine translation mixed up the usage of "rugged" in the context of terrain versus that of a society.
Here's a comparison with Google Translate, using a snippet of the second speech. Results from the Hugging Face - MarianMT model held up pretty well against Google's translation, in my view:
![](../images/body-d3b3894584c9665c28a8.png)
To be sure, neither version can be used without correcting for some obvious errors. Google's results, for instance, translated the phrase "called the election" to "打电话给这次选举", or to literally _make a telephone call to the election_. The phrasing of the translated Chinese sentences is also awkward in many instances.
A skilled human translator would definitely do a better job at this point. But I think it is fair to say that even a highly experienced translator won't be able to translate _all three_ speeches within minutes.
The draw of machine translation, for now, appears to be scale and relative speed rather than precision. Let's try the same model on a different genre of writing to see how it performs.
## 2B. ENGLISH-TO-CHINESE MACHINE TRANSLATION OF 5 NEWS ARTICLES
Speeches are more conversational, so I picked five random news articles on Covid-19 (published in March 2020) to see how the model performs against a more formal style of writing. To keep things simple, I selected articles that are under 500 words.
The workflow in this [second trial](https://github.com/chuachinhon/practical_nlp/blob/master/notebooks/4.1_english_to_chinese_news.ipynb) is identical to the first, except for additional text cleaning rules and the translation of the articles' headlines alongside the body text. Here's what the output CSV file looks like:
![Download a copy of the above CSV here.](../images/004.jpeg)
Download a copy of the above CSV [here](https://www.dropbox.com/sh/q4vy8recuib4rs9/AACpGaQdQnjp1Ey2lcKDMJgFa/cna_translated.csv?dl=0).
Let's compare one of the examples with the results from Google Translate:
![](../images/body-d4ce4b121e7b7bf4558d.jpeg)
Both Google and MarianMT tripped up on the opening paragraph, which was fairly long and convoluted. The two models performed slightly better on the shorter sentences/paragraphs, but the awkward literal translations of simple phrases continue to be a problem.
For instance, the phrase "as tourists stay away" was translated by the MarianMT model as "游客离家出走" or "tourists ran away from home", while Google translated it as "游客远离了当地" or "tourists kept away from the area".
These issues could result in misinterpretations of factual matters, and cause confusion. I haven't conducted a full-fledged test, but based on the trials I've done so far, both MarianMT and Google Translate appear to do better with text that's more conversational in nature, as opposed to more formal forms of writing.
## 2C. DASH APP
Plotly has released a good number of [sample interactive apps](https://github.com/plotly/dash-sample-apps) for transformer-based NLP tasks, including one that works with Hugging Face's version of MarianMT. Try it out on [Colab](https://github.com/plotly/dash-sample-apps/blob/master/apps/dash-translate/ColabDemo.ipynb), or via [Github](https://github.com/plotly/dash-sample-apps) (I edited the app's headline in the demo gif below).
![](../images/body-5454bc002955624100d2.gif)
## 3. CHINESE-TO-ENGLISH MACHINE TRANSLATION OF 3 SPEECHES
Machine translation of Chinese text into English tend to be a [trickier task in general](https://www.polilingua.com/blog/post/challenges-of-Chinese-to-English-translation-or-how-to-avoid-Chinglish.htm), as most NLP libraries/tools focus are English-based. There isn't a straightforward equivalent of the sentence tokenizer in NLTK, for instance.
I experimented with [jieba](https://github.com/fxsjy/jieba) and [hanlp](https://github.com/hankcs/HanLP) but didn't get very far. As a temporary workaround, I [adapted a function](https://github.com/cognoma/genes/blob/721204091a96e55de6dcad165d6d8265e67e2a48/2.process.py#L61-L95) to split the Chinese text in the dataframe column into individual sentences prior to running them via the [Chinese-to-English MarianMT model](https://huggingface.co/Helsinki-NLP/opus-mt-zh-en).
![](../images/body-33925d30b23eb6e42845.png)
But even with the somewhat clumsy workaround, the batch translation of the three Chinese speeches took just about 5 minutes. Do note that these three speeches are the official Chinese versions of the three earlier English speeches. The two sets of speeches cover the same ground but there are some slight variations in the content of the Chinese speeches, which aren't direct, word-for-word translations of the English versions.
You can download the output CSV file [here](https://www.dropbox.com/sh/q4vy8recuib4rs9/AACHKvbULez2oiNDI4oKJH1fa/speeches_cn_to_en.csv?dl=0). Let's see how the results for the [third speech ](https://www.pmo.gov.sg/Newsroom/National-Day-Message-2020-Chinese)compare with Google Translate:
![](../images/body-c35181e0098c6a7b2c51.png)
The Google Translate version reads much better, and didn't have the glaring error of translating "National Day" as "Fourth of July". Overall, the results of Chinese-to-English machine translation appear (to me at least) considerably better than that for English-to-Chinese translation. But one possible reason is that the Chinese speeches in my sample were more simply written, and did not push the neural machine translation models that hard.
## 4. FOOD FOR THOUGHT
While Hugging Face has made machine translation more accessible and easier to implement, some challenges remain. One obvious technical issue is the [fine-tuning of neural translation models](https://tmramalho.github.io/science/2020/06/10/fine-tune-neural-translation-models-with-mBART/) for specific markets.
For instance, China, Singapore and Taiwan differ quite significantly in their usage of the written form of Chinese. Likewise, Bahasa Melayu and Bahasa Indonesia have noticeable differences even if they sound/look identical to non-speakers. Assembling the right datasets for such fine tuning won't be a trivial task.
In terms of the results achievable by the publicly available models, I would argue that the machine translated English-to-Chinese and Chinese-to-English texts aren't ready for public publication unless a skilled translator is on hand to check and make corrections. But that's just one use case. In situations where the translated text is part of a bigger internal workflow that does not require publication, machine translation could come in very handy.
For instance, if I'm tasked to track disinformation campaigns on social media by Chinese or Russian state actors, it just wouldn't make sense to try to translate the torrent of tweets and FB posts manually. Batch machine translation of these short sentences or paragraphs would be far more efficient in trying to get a broad sense of the messages being peddled by the automated accounts.
Likewise, if you are tracking social media feedback for a new product or political campaign in a multi-lingual market, batch machine translation will likely be a far more efficient way of monitoring non-English comments collected from Instagram, Twitter or Facebook.
Ultimately, the growing use of machine translation will be driven by the broad decline of language skills, even in nominally multi-lingual societies like Singapore. You may scoff at some of the machine translated text above, but most working adults who have gone through Singapore's bilingual education system are unlikely to do much better if asked to translate the text on their own.
* * *
The [Github repo for this post](https://github.com/chuachinhon/practical_nlp) can be found here. This is the fourth in a series on practical applications of new NLP tools. The earlier posts/notebooks focused on:
  * [sentiment analysis of political speeches](https://www.analytix-labs.com/insights/cb-speeches)
  * [text summarisation](https://towardsdatascience.com/practical-nlp-summarising-short-and-long-speeches-with-hugging-faces-pipeline-bc7df76bd366)
  * [fine tuning your own chat bot](https://medium.com/@chinhonchua/beginners-guide-to-building-a-singlish-ai-chatbot-7ecff8255ee?sk=ea4f20a44a73321fad8b592d3ede6243).


If you spot mistakes in this or any of my earlier posts, ping me at:
  * Twitter: [Chua Chin Hon](https://medium.com/u/b3d8090c0aee?source=post_page-----aad7f2e1d0a0----------------------)
  * LinkedIn: [www.linkedin.com/in/chuachinhon](http://www.linkedin.com/in/chuachinhon)


## Register Now to Continue Reading
### Unlock Towards Data Science with a Free Account
All articles on Towards Data Science are available to registered users. Create a free account today to access this article and thousands more.
Register for freeSign in to your account
* * *
![](../images/body-d56b810b4697a0fbf983.png)
Written By
## [Chua Chin Hon](https://towardsdatascience.com/author/chuachinhon/)
[See all from Chua Chin Hon](https://towardsdatascience.com/author/chuachinhon/)
[AI](https://towardsdatascience.com/tag/ai/)[Data Science](https://towardsdatascience.com/tag/data-science/)[Machine Translation](https://towardsdatascience.com/tag/machine-translation/)[Singapore](https://towardsdatascience.com/tag/singapore/)[Transformers](https://towardsdatascience.com/tag/transformers/)
Share This Article
  * [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Ftowardsdatascience.com%2Flost-in-machine-translation-3b05615d68e7%2F&title=Lost%20In%20\(Machine\)%20Translation)
  * [](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Ftowardsdatascience.com%2Flost-in-machine-translation-3b05615d68e7%2F&title=Lost%20In%20\(Machine\)%20Translation)
  * [](https://x.com/share?url=https%3A%2F%2Ftowardsdatascience.com%2Flost-in-machine-translation-3b05615d68e7%2F&text=Lost%20In%20\(Machine\)%20Translation)


Towards Data Science is a community publication. Submit your insights to reach our global audience and earn through the TDS Author Payment Program.
[Write for TDS](https://towardsdatascience.com/submissions/)
## Related Articles
  * [![](../images/005.png)](https://towardsdatascience.com/all-models-are-wrong-a75103196cdb/)
## [How to use the Assumption-Lean Approach for Correct Inference](https://towardsdatascience.com/all-models-are-wrong-a75103196cdb/)
[Data Science](https://towardsdatascience.com/category/data-science/)
Why all models are wrong but some are useful.
[Michael Berk](https://towardsdatascience.com/author/michaelberk/)
July 13, 20217 min read
  * [![](../images/006.jpg)](https://towardsdatascience.com/exploratory-analysis-of-nasa-astronauts-from-1959-2016-778aba6775a8/)
## [Exploratory Analysis of NASA Astronauts from 1959-2016](https://towardsdatascience.com/exploratory-analysis-of-nasa-astronauts-from-1959-2016-778aba6775a8/)
[Data Science](https://towardsdatascience.com/category/data-science/)
When we are children and the world seems to be filled with infinite, endless and wondrous possibilities, we are asked what we wanted to be...
[Edwin Jarquin](https://towardsdatascience.com/author/edwinjarquin/)
October 27, 20203 min read
  * [![](../images/007.jpeg)](https://towardsdatascience.com/my-wonderful-journey-to-become-an-advanced-analytics-junior-consultant-in-norway-6df652ad9487/)
## [My wonderful journey to become an advanced analytics junior consultant in Norway](https://towardsdatascience.com/my-wonderful-journey-to-become-an-advanced-analytics-junior-consultant-in-norway-6df652ad9487/)
[Artificial Intelligence](https://towardsdatascience.com/category/artificial-intelligence/)
How an MSc in Business Analytics helped me to accelerate my professional career and break into data science
[Juan Manuel Ruiz](https://towardsdatascience.com/author/juanmruiza/)
September 10, 202014 min read
  * [![](../images/008.jpg)](https://towardsdatascience.com/an-explainer-on-tree-ensemble-layer-b7e445621a3f/)
## [An explainer on Tree Ensemble Layer](https://towardsdatascience.com/an-explainer-on-tree-ensemble-layer-b7e445621a3f/)
[Artificial Intelligence](https://towardsdatascience.com/category/artificial-intelligence/)
A new type of neural network layer with the benefits of decision trees.
[Ayush Kumar](https://towardsdatascience.com/author/ayushkr79/)
July 3, 20214 min read
  * [![](../images/009.jpg)](https://towardsdatascience.com/are-the-clusters-good-1567de6a9524/)
## [Are the clusters good?](https://towardsdatascience.com/are-the-clusters-good-1567de6a9524/)
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
Understanding how to evaluate clusters
[Dr. Saptarsi Goswami](https://towardsdatascience.com/author/saptarsi007/)
July 27, 20206 min read
  * [![](../images/010.jpeg)](https://towardsdatascience.com/my-machine-learning-model-performs-well-but-i-want-it-to-fail-640660fe0d2c/)
## [My Machine Learning Model Performs Well, but I Want It To Fail](https://towardsdatascience.com/my-machine-learning-model-performs-well-but-i-want-it-to-fail-640660fe0d2c/)
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
Exploring data scientists' ethical responsibility
[Celina Plaza](https://towardsdatascience.com/author/celina_plaza/)
September 19, 20204 min read
  * [![](../images/011.jpg)](https://towardsdatascience.com/introduction-to-deep-learning-with-keras-17c09e4f0eb2/)
## [Introduction to Deep Learning with Keras](https://towardsdatascience.com/introduction-to-deep-learning-with-keras-17c09e4f0eb2/)
[Deep Learning](https://towardsdatascience.com/category/artificial-intelligence/deep-learning/)
How to use the Keras Deep Learning library
[Gilbert Tanner](https://towardsdatascience.com/author/gilberttanner/)
January 9, 20195 min read
  * [![](../images/012.jpeg)](https://towardsdatascience.com/aesthetic-epistemology-a-review-of-erna-fiorentinis-inducing-visibilities-3d61919593c3/)
## [Aesthetic Epistemology: A Review of Erna Fiorentini's"Inducing Visibilities..."](https://towardsdatascience.com/aesthetic-epistemology-a-review-of-erna-fiorentinis-inducing-visibilities-3d61919593c3/)
[Data Science](https://towardsdatascience.com/category/data-science/)
A Brief Review of "Inducing visibilities: An attempt at Santiago Ramón y Cajal's aesthetic epistemology"...
[Jesse Ruiz (she/they)](https://towardsdatascience.com/author/jjr8888/)
May 24, 20213 min read
  * [![](../images/013.png)](https://towardsdatascience.com/read-and-write-obsessively-there-are-no-real-shortcuts-to-producing-great-work-4ea1f3421eec/)
## [Read and Write Obsessively: There are No Real Shortcuts to Producing Great Work](https://towardsdatascience.com/read-and-write-obsessively-there-are-no-real-shortcuts-to-producing-great-work-4ea1f3421eec/)
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
On working in public, chasing intrinsic motivation, and taking risks in writing
[TDS Editors](https://towardsdatascience.com/author/towardsdatascience/)
May 12, 20219 min read


  * [YouTube](https://www.youtube.com/c/TowardsDataScience)
  * [X](https://x.com/TDataScience)
  * [LinkedIn](https://www.linkedin.com/company/towards-data-science/)
  * [Threads](https://www.threads.net/@towardsdatascience)
  * [Bluesky](https://bsky.app/profile/towardsdatascience.com)


[](https://towardsdatascience.com/)
Your home for data science and AI. The world's leading publication for data science, data analytics, data engineering, machine learning, and artificial intelligence professionals.
Subscribe to Our Newsletter[Write For TDS](https://towardsdatascience.com/submissions/)•[About](https://towardsdatascience.com/about-towards-data-science-d691af11cc2f/)•[Advertise](https://contact.towardsdatascience.com/advertise-with-towards-data-science)•[Privacy Policy](https://towardsdatascience.com/privacy-policy/)•[Terms of Use](https://towardsdatascience.com/website-terms-of-use/)
© Insight Media Group, LLC 2026•[The New Stack](https://thenewstack.io)•[roadmap.sh](https://roadmap.sh)•[Creator Network](https://insightmediagroup.io/creator-network)
####  Recommended Articles 
Close
  * [ ![](https://h030.towardsdatascience.com/rest/v2/contentStores/d7d3a4ab-7caf-4383-bbd2-fbf7fb4f1787/items/607639/image?etag=1781250125848&width=500&height=500) Javascript Fatigue: HTMX Is All You Need to Build ChatGPT — Part 1 ](https://towardsdatascience.com/javascript-fatigue-you-dont-need-js-to-build-chatgpt/ "Javascript Fatigue: HTMX Is All You Need to Build ChatGPT — Part 1")
  * [ ![](https://h030.towardsdatascience.com/rest/v2/contentStores/d7d3a4ab-7caf-4383-bbd2-fbf7fb4f1787/items/607930/image?etag=1782124566054&width=500&height=500) The Subset Sum Problem Solved in Linear Time for Dense Enough Inputs ](https://towardsdatascience.com/subset-sum-problem-solved-in-linear-time-for-dense-enough-inputs/ "The Subset Sum Problem Solved in Linear Time for Dense Enough Inputs")
  * [ ![](https://h030.towardsdatascience.com/rest/v2/contentStores/d7d3a4ab-7caf-4383-bbd2-fbf7fb4f1787/items/3660/image?etag=1780176246070&width=500&height=500) Does Your Company Have a Data Strategy? ](https://towardsdatascience.com/does-your-company-have-a-data-strategy-e8944dbec4ae/ "Does Your Company Have a Data Strategy?")
  * [ ![](https://h030.towardsdatascience.com/rest/v2/contentStores/d7d3a4ab-7caf-4383-bbd2-fbf7fb4f1787/items/4970/image?etag=1780565225463&width=500&height=500) Productivity Tips, Data Career Insights, and Other Recent Must-Reads ](https://towardsdatascience.com/productivity-tips-data-career-insights-and-other-recent-must-reads-5c47eb7a2fe0/ "Productivity Tips, Data Career Insights, and Other Recent Must-Reads")


