Giter Club home page Giter Club logo

drl-gec's People

Contributors

rajk853 avatar

Watchers

 avatar  avatar

drl-gec's Issues

Environment interaction interface

An interface to test our GEC environments.

  • State transitions (state, action, reward, new state, done)
  • Environment resetting
  • Environment rendering
  • Random action samples
  • Update reward weights
  • Update sampler weights
  • Save interaction

Create OpenAI Gym Environment

Text-based OpenAI Gym Environment

Data Format

A JSON file with source and list of target sentences.

  • Script to convert M2 into JSON
  • Data cleaning:
    • Normalize characters (both source and references)
    • Remove emojis M2 file does not have any emojis
    • Fix typos using Pyspellchecker (only source sentences. References are hopefully corrected!)
  • Data filtering:
    • Number of tokens in the original sentences
    • References ending properly
    • Mean similarity between the original and reference sentences
  • Generate metadata [Optional]
    • Number of sentences
    • Number of different references per sentence

Episode

  • Reset
    • Select the state
      • Source and target sentences
  • Take a step
    • Calculate the reward
      • Generate intermediate tokens
      • Compute GLEU scores with target sentences
      • Subtract \epsilon from the reward
    • Obtain the new state
    • Check episode termination
      • N-steps attempted
      • Token length condition
      • All keep actions condition
    • Return new state, reward and done

Reward function

$$r(s_t, a_t) = r_{gleu} + r_{delay} + r_{invalid-label}$$

Implement DDQN algorithm

  • Create a simple Replay Buffer
  • Implement the Q-loss function
  • Implement target network weight updates

Random Sampler

Create a weighted random sampler that generates biased random actions.

Features:

  • Limit the number of non-keep labels in an action Done implicitly using the weights
  • Generate sample weights based on label weights

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.