Giter Club home page Giter Club logo

Comments (4)

glample avatar glample commented on August 21, 2024 1

Because there is an option dico_threshold that looks at the difference between the score of the best and second best translation, and will only take translation pairs where this difference is above the threshold, i.e. there is no ambiguity and the best translation is clearly better than the second best. For this we need to select the best 2 scores, i.e. we concat all top2 words from each batch :)

But this is just an option which we do not use in practice.

from muse.

glample avatar glample commented on August 21, 2024

Hi,

The 128 here is just the batch size. For 128 source words we look at their best translations over all target words. We do that batch by batch because otherwise it involves to create a matrix of size (n_src, n_tgt) in memory (where n_src and n_tgt are the numbers of source and target words) and this will not fit for large vocabularies.

from muse.

sufengniu avatar sufengniu commented on August 21, 2024

I see. that makes sense. In that case, I wonder what is the reason to pickup the top 2 best scores, I mean to make candidate pairs, top 1 and its self should work already. Thank you!

from muse.

sufengniu avatar sufengniu commented on August 21, 2024

I see. Thank you for elaboration!

from muse.

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.