Code Monkey home page Code Monkey logo

mt_decoder's Introduction

##Decoder

####CIS526, Machine Translation, HW2

Sean Welleck

This project is related to decoding a source sentence by maximizing the probability of the target sentence.

The project contains three decoders:

And functions to combine two decodings.

Run python decode > output.txt to decode using the default input files, and output the translations to output.txt.

Run python combine -x filename1 -y filename2 > combined.txt to combine two decoded files, by choosing the higher scoring sentence, and output to combined.txt.


#####Algorithm

  1. Decode with the monotone decoder.
  2. Decode with the greedy decoder, using the decodings from (1) as the initial seed decoding.
  3. Save decodings from (2).
  4. Decode with the stack decoder.
  5. Decode with the greedy decoder, using the decodings from (4) as the initial seed decoding.
  6. Combine decodings from (5) and (2).

#####Other

  1. Uses a combination of histogram pruning and threshold pruning.
  2. Uses <= 40 translations per phrase.

#####decoder.py Contains the decoder implementations in a single Decoder class.

Contains the top-level user functions decode() and combine(). #####evaluator.py Contains an Evaluator class that adapts the grading function.

Used to choose between two sentence translations while combining decodings.

Used as an alternative scoring function for the greedy decoder. Due to performance, I ended up just using my original, simpler scoring function.

mt_decoder's People

Contributors

wellecks avatar

Watchers

James Cloos avatar

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.