Giter Site home page Giter Site logo

chinese2english_seq2seq_attention's Introduction

Chinese2English_Seq2Seq_Attention

A Sequence to Sequence with Attention Model for translate chinese sentence to english sentence. Reference to the paper: [https://aclweb.org/anthology/D15-1166]

Requirement

Here are packages must be installed.

$ git clone https://github.com/victorlin12345/Chinese2English_Seq2Seq_Attention.git
$ pip install tensorflow==2.0.0-rc0 
$ pip install jieba

Usage

train, translate functions is provided in this project now.

  • train: can train your own model by this command line.
    $ python3 run_nn.py train 
  • transalte: after input this command line will show the input line for typing your single chinese sentence. Press Ctrl+C to leave. ( This project provides the model trained only 5 EPOCHS. )
    $ python3 run_nn.py translate 湯姆累了。
    
    tom was tired .

Result

Here are some Ch2Eng results from my project.

Chinese English
你好 how you are !
湯姆累了。 tom tried .
祝我好運。 i hope i am good luck .
瑪麗笑了。 mary smiled .
今天天氣很好。 it's a nice day .
抱歉,我總是遲到。 i'm sorry that i am late .
醫生叫我要多休息。 the doctor called me a while i should take a while .
其實我只想知道事實。 i wonder if i know the facts .
紐西蘭是個美麗的國家。 witzerland is a beautiful country .
我想要養一隻貓,但我媽媽不讓我養。 i want to the cat and i don't have a banana drinking .

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.