Code Monkey home page Code Monkey logo

leganto-mono's People

Contributors

mathisbullinger avatar

Watchers

 avatar  avatar

leganto-mono's Issues

Language combinations

When translating a document into multiple languages, the number of possible combinations (disregarding order of languages) is $\sum\limits_{i=1}^{n} \frac{n!}{i!(n-i)!} = 2^{n-1}$, where n is the number of languages the document is translated to.
E.g. for a document that is translated to German, English, and Spanish, the possible combinations are de, en, es, de,en, de,es, en,es, and de,en,es.

To store these combinations in a denormalized system, certain limits must be set. A first step might be to limit the number of languages that can be displayed at any given time, resulting in the number of combinations being $\sum\limits_{i=1}^{x} \frac{n!}{i!(n-i)!}$, where x is the maximum number of languages that can be displayed. This result in the following number of combinations:

Screenshot 2022-07-16 at 17 24 39 copy

Clearly, just limiting the number of languages per combination is not flexible enough if the number of resulting combinations should be kept reasonably low.

A better approach may be setting a limit on the allowed combinations per document and adjusting the number of languages that can be displayed concurrently y based on the number of languages the document is translated to x to fit the limit:

Screenshot 2022-07-16 at 17 37 58

Setting the limit at 1200 combinations, this would result in documents translated in up to 19 languages being viewable in three languages at a time, and documents being translated in to up to 48 languages being viewable in two languages at a time, setting an effective limit for the number of languages a document can be translated to.

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.