avatarJesús

Summary

A spaCy and Streamlit-powered translator has been developed to aid language learning by color-coding words based on syntactic function and showing sentence structure differences between languages.

Abstract

The author has created a unique translator tool using spaCy for syntactic analysis and Streamlit for the user interface. This tool goes beyond traditional translation services by visually differentiating words according to their grammatical role, which is particularly beneficial for language learners who need to understand sentence structure and word relationships. The translator is demonstrated in a video, showing its application in translating English to Spanish, and the author invites feedback on how to improve the tool for language learners.

Opinions

  • Traditional translators like Google Translate or Deepl may not be sufficient for language learners who need to understand the structure of sentences and the function of each word.
  • The new translator tool is praised for its ability to help learners identify word relationships and sentence structures across different languages, which is especially useful for languages with significantly different grammatical structures.
  • The author believes that this tool can save time for learners by allowing them to see the correspondence between words in the original and translated texts.
  • The author is open to suggestions and values community input on what features would be beneficial to include in the translator to enhance language learning.

Spacy-Powered Translator with Streamlit

I’m sure that on more than one occasion you have used a translator such as Google Translate or Deepl. These tools allow us to translate any text from one language to another in a fast and easy way.

The problem is when you like to learn languages, you are beginning to understand what each word means, how the sentences are structured and translating the text directly does not help much.

To solve these problems, I have created my own translator thanks to Spacy and Streamlit.

Added features to the translator

I have done something very simple but very helpful for learning languages. I have added that the text to be translated and the translated text appear with the words colored according to their syntactic function.

What does this solve for me?

Thanks to this I can identify the relationship between the words in the text to be translated and the translated text, and I can also see how sentences are structured in one language and the other.

This helps a lot when you learn a language that has a very different grammatical structure from your own.

There are languages that have an S (subject) + V (verb) + O (object) structure. Other languages have the structure S + O + V and so on.

This way, when translating a text you can save yourself from translating individual words because you do not know the correspondence between the word to be translated and the translated word.

How I developed the translator

As an example I made a translator that translates from English to Spanish, but it could be done with any language.

Thanks to Spacy I identify the syntactic function of each word. Streamlit helps me to have the interface

I leave you a video where you can see the whole process.

Conclusions

I would like to know your opinion, to know what you would consider important to have in a translator that would help you learn languages, and learn about other experiences.

I think it is a tool that can be useful when you start learning a language very different from your own, and that can save you time.

Spacy
Streamlit
Language Learning
Translator App
Learning Language Tips
Recommended from ReadMedium