Giter Site home page Giter Site logo

Comments (6)

motin avatar motin commented on July 25, 2024

Adding a yaml/json-formatted string as a parameter to TranslationRequest for specifying options specific to the request is definitely possible/performant in JS.

Note that while I am not married to the current design of the API/bindings and have no issues with updating the integration code to match whatever is decided in this repo, neither am I actively involved in the design decisions of the API at the moment, so I'll let y'all come up with the changes you need to achieve progress on that front, if that is ok with you?

from bergamot-translator.

motin avatar motin commented on July 25, 2024

@abhi-agg ping for comments

from bergamot-translator.

abhi-agg avatar abhi-agg commented on July 25, 2024

@jerinphilip If you are proposing to remove TranslationRequest class altogether and pass the translation request parameters as a YAML/JSON formatted std::string then I am fine with it.

I have just one comment. Since, model configuration is already being provided as a yaml-formatted string, it would be consistent if we treat the translation request also as a yaml-formatted string (instead of json formatted string). Is it fine with you?

We will have to add a documentation listing all the keys and the corresponding values that can be provided as translation request. Could you document them here? The PR review will be straightforward then 👍

from bergamot-translator.

jerinphilip avatar jerinphilip commented on July 25, 2024

All I have asked is this structure have certain properties similar to a dict. YAML or JSON is just a conversion thing (also aren't they same except how they're printed?), and the redundancies can be removed/adjusted during implementation. A string representation of such a dict is parsable into the dict, which suffices for me.

Could you document them here?

Probably not, this issue is solved at typedef std::string TranslationRequest;, let's have it at another issue.

from bergamot-translator.

abhi-agg avatar abhi-agg commented on July 25, 2024

YAML or JSON is just a conversion thing (also aren't they same except how they're printed?)

They are not same. YAML is a superset of JSON => A YAML parser can parse both JSON and a YAML formatted string.

Could you document them here?

Probably not, this issue is solved at typedef std::string TranslationRequest;,

Probably, I am not getting what you meant here. Let me ask you this way. What should we provide as std::string for translation request?

let's have it at another issue.

Wait. The title says "Change TranslationRequest into something like TranslationModelConfig". Is this issue not the right place for this discussion?

from bergamot-translator.

jerinphilip avatar jerinphilip commented on July 25, 2024

@abhi-agg Scope is bigger, moving to #89. Resolution, as I understand here, is you're okay dropping the existing TranslationRequest class (effectively replacing it with YAML string). I'll leave the issue open until the implementation is complete.

from bergamot-translator.

Related Issues (20)

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.