Giter Club home page Giter Club logo

deepl-localize's People

Contributors

dependabot[bot] avatar tzdesign avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

genox

deepl-localize's Issues

Context for deepl

Hi,

Not really an issue, more of a topic to explore. DeepL offers a context parameter. It is still considered beta but I've had good results with translations that only consist of a few words for another project where I use it to translate single word strings and such.

The way I implemented it is basically using a sort of context buffer that contains the last 8000 characters of requested translations in the original language. It is not watertight, but the quality of translations improved greatly. This might be especially helpful for UI strings and technical definitions that are very much depending on context.

As an example, using no context, deepL insisted that "TypeScript" is "TypScript" in German, which is not what it is supposed to translate to. With additional context from preceding original strings, it eventually started to correctly use the original.

I have this issue with this library and some e-commerce specific strings and short call to actions on buttons etc. that deepl insists on literal translations. There is a big chance that this would immediately be resolved with translation context.

The buffer method is not perfect, especially if there is not much in terms of preceding context available, but all in all, there is a very notable quality improvement.

Maybe something to consider as an optional parameter. I could try to implement this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.