Code Monkey home page Code Monkey logo

neural-human-translation-quality-estimation's Introduction

Neural-Human-Translation-Quality-Estimation

Deep Learning HTQE models hacked from 14 SOTA, such as TextCNN1D, RCNN, DPCNN, Transformers, neural architectures.

How to Use

  1. Configuration:

    pip install -r requirements.txt
    
  2. Choose to do regression or classification:

    1. classification:classify translation into 'good' (1) or 'poor' (0) or more categorical labels.
    2. regression: quantitatively score translations per certain scale, e.g. percent scale, within the range 0-1, etc.In this case, remember to set the number of classes to be 1.
  3. prepare your data as jsonl format and word embedding for both languages: run dataPreprocess.py to generate train, valid and test jsonl file as well as wordembedding matrix

{"id": 10750, "text": "[CLS] The Troika’s claims on Greece need not be reduced in face value, but their maturity would have to be lengthened by another decade, and the interest on it reduced. Further haircuts on private claims would also be needed, starting with a moratorium on interest payments.[SEP] 希腊还必须再次重组并削减公债。三驾马车的希腊债权不必在面值上有所让步,但期限必须延长十年,利息也必须减少。此外,还需要私人债权的进一步“剃头”,可以从暂停利息支付开始入手。[SEP]\n", "labels": [1]} {"id": 2086, "text": "[CLS] Weaker forts included Fort Larned, originally built mainly of adobe. [SEP] 较弱的堡垒包括拉恩堡, 它最初主要是用土豆建造的. [SEP]\n", "labels": [0]} ```

  1. build your own dataloader

  2. change the configuration files wherever is necessary

  3. run train.py

    python train.py
    

features

  • tensorboard visualization (metrics, )
  • transformers integrated huggingface/transformers
  • regression and classification compatible
  • support multi-GPU

Acknowledgement

This repo(https://github.com/jeffery0628/text_classification/) has saved me a lot of trouble of coding from scratch.

neural-human-translation-quality-estimation's People

Contributors

hittle2015 avatar

Watchers

James Cloos avatar  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.