Time is running out! Call for Code submissions due July 29 ›
by Riya Mary Roy, Sanjeev Ghimire | Published September 17, 2018
According to Ethnologue, there are 7097 known living languages, out of which more than 23 languages account for more than half of the world’s population and nearly two-thirds of languages are from Africa and Asia. While it is too difficult to learn all of the languages, an AI-powered language translator can definitely augment the human language translating capabilities.
Snap and translate text in images is a code pattern that helps you build a mobile application that can translate the recognized text from captured images or images that are uploaded from your phone’s photo album and extract emotion and sentiment from the text.
We used Apache Cordova, an open source hybrid mobile application development framework to build the mobile application. The server application, built in Node.js, is deployed in the IBM Cloud Kubernetes service and uses Tesseract OCR, IBM Watson Language Translator, and IBM Watson Natural Language Understanding.
Tesseract OCR is an open source OCR engine that can recognize more than 100 languages out of the box and can also be trained to recognized other languages.
IBM Watson Language Translator can identify the text language and translate it from one language to another language. It uses the Neural Machine translation, which is the latest method based on deep learning with improved accuracy, faster speeds, and new languages. Most of the provided translation models in Language Translator can be customized to learn custom terms and phrases. You can either customize the model with a forced glossary or with a corpus that contains parallel sentences.
IBM Watson Natural Language Understanding can analyze semantic features of text input like categories, concepts, emotions, entities, keywords, metadata, relations, semantic roles, and sentiment. You can also extend Natural Language Understanding with custom models that can identify custom entities and relations unique to your domain using Watson Knowledge Studio.
Text recognized from the image using Tesseract OCR is passed to Language Translator for translation, and sentiment/emotion of the translated text is extracted using Watson Natural Language Understanding. Then, the response from Tesseract OCR, Language Translator, and Natural Language Understanding is displayed to the user.
Try it out and share your feedback with us!
Get the Code »
Artificial intelligenceIBM PowerAI+
Back to top